Skip to content

Commit 70cd004

Browse files
authored
feat: support typescript definitions out of the box (#17)
1 parent 0205886 commit 70cd004

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

Diff for: index.d.ts

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
/**
2+
* Hyphenates a camelcased CSS property name
3+
*/
4+
declare function hyphenateStyleName(name: string): string;
5+
6+
export = hyphenateStyleName;

Diff for: package.json

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "Hyphenates a camelcased CSS property name",
55
"main": "index.cjs.js",
66
"module": "index.js",
7+
"types": "index.d.ts",
78
"sideEffects": false,
89
"scripts": {
910
"build": "rollup --input index.js --file index.cjs.js --format cjs",
@@ -16,7 +17,8 @@
1617
},
1718
"files": [
1819
"index.js",
19-
"index.cjs.js"
20+
"index.cjs.js",
21+
"index.d.ts"
2022
],
2123
"repository": {
2224
"type": "git",

0 commit comments

Comments
 (0)