Skip to content

Commit

Permalink
fix (taro-cli): 修改了templates/mobx/globaldts 删除import React 行 (#2454)
Browse files Browse the repository at this point in the history
typescript环境下global.d.ts使用import了关键字,导致其变成一个普通模块,|
无法作为全局环境声明。修改导出JSX namespace 方式

Fixes #2437
  • Loading branch information
leidenglai authored and luckyadam committed Apr 1, 2019
1 parent 59f0dd9 commit 242688b
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions packages/taro-cli/templates/mobx/globaldts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import React from 'react';

declare module "*.png";
declare module "*.gif";
declare module "*.jpg";
Expand All @@ -11,10 +9,8 @@ declare module "*.scss";
declare module "*.sass";
declare module "*.styl";

declare global {
namespace JSX {
interface IntrinsicElements {
'import': React.DetailedHTMLProps<React.EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>
}
}
declare namespace JSX {
interface IntrinsicElements {
'import': React.DetailedHTMLProps<React.EmbedHTMLAttributes<HTMLEmbedElement>, HTMLEmbedElement>
}
}

0 comments on commit 242688b

Please sign in to comment.