Browse Source

refactor: improve typescript module declare (#19254)

* refactor: improve typescript declare

* remove rc-progress  declare

* remove rc-drawer  declare

* improve site antd module resolve path
pull/19257/head
骗你是小猫咪 5 years ago
committed by 偏右
parent
commit
f2e541ade5
  1. 1
      package.json
  2. 5
      tsconfig.json
  3. 3
      tslint.json
  4. 8
      typings/custom-typings.d.ts

1
package.json

@ -153,6 +153,7 @@
"@types/raf": "^3.4.0",
"@types/react": "^16.9.0",
"@types/react-dom": "^16.8.4",
"@types/react-lifecycles-compat": "^3.0.1",
"@types/shallowequal": "^1.1.1",
"@types/warning": "^3.0.0",
"@typescript-eslint/eslint-plugin": "^2.0.0",

5
tsconfig.json

@ -1,5 +1,10 @@
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"antd": ["components/index.tsx"],
"antd/es/*": ["components/*"]
},
"strictNullChecks": true,
"moduleResolution": "node",
"esModuleInterop": true,

3
tslint.json

@ -1,3 +0,0 @@
{
"extends": ["./node_modules/@ant-design/tools/lib/tslint.json"]
}

8
typings/custom-typings.d.ts

@ -20,16 +20,10 @@ declare module 'rc-cascader';
declare module 'rc-checkbox';
declare module 'rc-radio';
declare module 'rc-dropdown';
declare module 'rc-editor-mention';
declare module 'rc-progress';
declare module 'rc-drawer';
declare module 'rc-tabs*';
declare module 'rc-tree';
@ -81,6 +75,4 @@ declare module '*.json' {
export default value;
}
declare module 'react-lifecycles-compat';
declare module 'react-copy-to-clipboard';

Loading…
Cancel
Save