diff --git a/index.d.ts b/index.d.ts new file mode 100644 index 0000000..ed047a3 --- /dev/null +++ b/index.d.ts @@ -0,0 +1,3 @@ +export function install(container: Element, hotkey?: string): void; +export function uninstall(container: Element): void; +export function eventToHotkeyString(event: Event): string; diff --git a/package.json b/package.json index 3ef50c8..d8532d7 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "description": "", "main": "dist/index.umd.js", "module": "dist/index.esm.js", + "types": "index.d.ts", "repository": "github/hotkey", "scripts": { "build": "rollup -c && cp src/index.js.flow dist/index.esm.js.flow && cp src/index.js.flow dist/index.umd.js.flow", @@ -16,7 +17,8 @@ "postpublish": "npm publish --ignore-scripts --@github:registry='https://npm.pkg.github.com'" }, "files": [ - "dist" + "dist", + "index.d.ts" ], "keywords": [], "author": "",