Skip to content

Commit c763df9

Browse files
RobinMalfaitzanona
andauthored
Add type declaration (#118)
* Add type declaration * update types - This way it doesn't rely on the `@types/tailwindcss` Definetely Typed repo which could cause issues when we release Tailwind CSS 3.1 with our own types. - Use `export = plugin` instead of `export default plugin` so that it is compatible with `module.export` Co-authored-by: Marcus Zanona <[email protected]>
1 parent 7ef7a14 commit c763df9

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"name": "@tailwindcss/forms",
33
"version": "0.5.1",
44
"main": "src/index.js",
5+
"types": "src/index.d.ts",
56
"license": "MIT",
67
"repository": "https://github.com/tailwindlabs/tailwindcss-forms",
78
"publishConfig": {

src/index.d.ts

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
declare function plugin(options?: { strategy?: 'base' | 'class' }): Function
2+
export = plugin

0 commit comments

Comments
 (0)