diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 000000000..462b5f144 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,4 @@ +import type { Plugin } from "prettier"; + +declare const plugin: Plugin; +export default plugin; diff --git a/package.json b/package.json index 5bb40058d..7fede99ad 100644 --- a/package.json +++ b/package.json @@ -7,17 +7,23 @@ "license": "MIT", "unpkg": "./standalone.js", "browser": "./standalone.js", + "types": "./index.d.ts", "exports": { ".": { + "types": "./index.d.ts", "browser": "./standalone.js", "default": "./src/index.mjs" }, - "./standalone": "./standalone.js", + "./standalone": { + "types": "./index.d.ts", + "default": "./standalone.js" + }, "./package.json": "./package.json" }, "files": [ "src", - "standalone.js" + "standalone.js", + "index.d.ts" ], "dependencies": { "linguist-languages": "^7.27.0",