ant-design-icons icon indicating copy to clipboard operation
ant-design-icons copied to clipboard

Add type path.

Open mushan0x0 opened this issue 4 years ago • 2 comments

mushan0x0 avatar May 15 '20 02:05 mushan0x0

Would this be causing type errors when using "@ant-design/icons" in a typescript component?

I've resolved for now by adding "skipLibCheck": true in our tsconfig.ts

tristanhcole avatar Jul 16 '20 00:07 tristanhcole

"files": [
    "dist",
    "lib",
    "es"
],
"types": "./lib/index.d.ts",

I am using this in my project right now, which massively improves the IDE behaviour (see https://youtrack.jetbrains.com/issue/WEB-44118 / https://youtrack.jetbrains.com/issue/WEB-44836).

This also matches what we have for the main antd package, the additional "files" array improves auto-import behaviour, which together with the "types" fixes almost all issues. The only remaining problem is now #304.

lukasluecke avatar Jul 28 '20 11:07 lukasluecke