Skip to content

Commit

Permalink
Add type declaration (#118)
Browse files Browse the repository at this point in the history
* 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 <marcus@zanona.co>
  • Loading branch information
RobinMalfait and zanona committed May 18, 2022
1 parent 7ef7a14 commit c763df9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "@tailwindcss/forms",
"version": "0.5.1",
"main": "src/index.js",
"types": "src/index.d.ts",
"license": "MIT",
"repository": "https://github.com/tailwindlabs/tailwindcss-forms",
"publishConfig": {
Expand Down
2 changes: 2 additions & 0 deletions src/index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
declare function plugin(options?: { strategy?: 'base' | 'class' }): Function
export = plugin

1 comment on commit c763df9

@vercel
Copy link

@vercel vercel bot commented on c763df9 May 18, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.