Skip to content

Commit 61bd0b6

Browse files
fix: add type declaration for ./style export to resolve TS2882 error
The ./style export only pointed to a CSS file without type definitions, causing tsc to fail with TS2882 when projects import inklayer-react/style. Added dist/style.d.ts with explicit module declaration and updated package.json exports to include types field.
1 parent 188ee2f commit 61bd0b6

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

dist/style.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export {}

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,10 @@
4242
"import": "./dist/index.es.js",
4343
"require": "./dist/index.cjs.js"
4444
},
45-
"./style": "./dist/inklayer-react.css"
45+
"./style": {
46+
"types": "./dist/style.d.ts",
47+
"default": "./dist/inklayer-react.css"
48+
}
4649
},
4750
"sideEffects": [
4851
"*.css",

0 commit comments

Comments
 (0)