diff --git a/package.json b/package.json index 0a2f6de..11dd921 100644 --- a/package.json +++ b/package.json @@ -3,7 +3,15 @@ "version": "3.1.0", "description": "Array of \"void elements\" defined by the HTML specification.", "main": "index.js", + "typings": "types.d.ts", "jsnext:main": "index.es.js", + "module": "index.es.js", + "exports": { + ".": { + "require": "./index.js", + "import": "./index.es.js" + } + }, "scripts": { "pretest": "node build.js test/latest.js", "test": "node test", @@ -16,7 +24,8 @@ ], "files": [ "index.js", - "index.es.js" + "index.es.js", + "types.d.ts" ], "repository": "pugjs/void-elements", "author": "hemanth.hm", diff --git a/types.d.ts b/types.d.ts new file mode 100644 index 0000000..ac34fd0 --- /dev/null +++ b/types.d.ts @@ -0,0 +1,5 @@ +declare type VoidElementKeys = 'area' | 'base' | 'br' | 'col' | 'embed' | 'hr' | 'img' | 'input' | 'link' | 'meta' | 'param' | 'source' | 'track' | 'wbr'; + +declare const voidElements: Record; + +export default voidElements;