Skip to content

Commit

Permalink
fix ts error
Browse files Browse the repository at this point in the history
  • Loading branch information
chenshuai2144 committed Feb 24, 2021
1 parent 0cd56b9 commit c8d111c
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 20 deletions.
25 changes: 9 additions & 16 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
"lib": ["esnext", "dom"],
"sourceMap": true,
"baseUrl": ".",
"jsx": "react",
"jsx": "react-jsx",
"resolveJsonModule": true,
"allowSyntheticDefaultImports": true,
"moduleResolution": "node",
"forceConsistentCasingInFileNames": true,
Expand All @@ -19,22 +20,12 @@
"strict": true,
"paths": {
"@/*": ["./src/*"],
"@@/*": ["./.umi/*"]
"@@/*": ["./src/.umi/*"]
}
},
"exclude": [
"node_modules",
"build",
"dist",
"scripts",
"acceptance-tests",
"webpack",
"jest",
"src/setupTests.ts"
],
"include": [
"typings.d.ts",
"**/src/**/*",
"mock/**/*",
"src/**/*",
"tests/**/*",
"test/**/*",
"__test__/**/*",
Expand All @@ -43,6 +34,8 @@
".eslintrc.js",
".stylelintrc.js",
".prettierrc.js",
"jest.config.js"
]
"jest.config.js",
"mock/*"
],
"exclude": ["node_modules", "build", "dist", "scripts", "src/.umi/*", "webpack", "jest"]
}
35 changes: 31 additions & 4 deletions typings.d.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
declare module 'slash2';
declare module '*.css';
declare module '*.less';
declare module '*.scss';
Expand All @@ -9,9 +10,35 @@ declare module '*.jpeg';
declare module '*.gif';
declare module '*.bmp';
declare module '*.tiff';

declare module 'bizcharts-plugin-slider';

declare module 'react-fittext';
declare module 'omit.js';
declare module 'numeral';
declare module '@antv/data-set';
declare module 'mockjs';
declare module 'react-fittext';
declare module 'bizcharts-plugin-slider';

// google analytics interface
type GAFieldsObject = {
eventCategory: string;
eventAction: string;
eventLabel?: string;
eventValue?: number;
nonInteraction?: boolean;
};

interface Window {
ga: (
command: 'send',
hitType: 'event' | 'pageview',
fieldsObject: GAFieldsObject | string,
) => void;
reloadAuthorized: () => void;
}

declare let ga: () => void;

// preview.pro.ant.design only do not use in your production ;
// preview.pro.ant.design 专用环境变量,请不要在你的项目中使用它。
declare let ANT_DESIGN_PRO_ONLY_DO_NOT_USE_IN_YOUR_PRODUCTION: 'site' | undefined;

declare const REACT_APP_ENV: 'test' | 'dev' | 'pre' | false;

0 comments on commit c8d111c

Please sign in to comment.