Skip to content

Commit ecc08ce

Browse files
committed
fix type issues with TypeScript
1 parent 47e7dd0 commit ecc08ce

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

index-fn.d.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
import "./invoker.d.ts";
2-
export * from "./invoker.js";
1+
export declare function isSupported(): boolean;
2+
export declare function isPolyfilled(): boolean;
3+
export declare function apply(): void;

package.json

+13-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22
"name": "invokers-polyfill",
33
"version": "0.0.0-development",
44
"description": "This polyfills the HTML `invoketarget`/`invokeaction`, as proposed by the Open UI group.",
5+
"repository": {
6+
"type": "git",
7+
"url": "git+https://github.com/keithamus/invokers-polyfill.git"
8+
},
59
"license": "MIT",
610
"author": "Keith Cirkel (https://keithcirkel.co.uk)",
711
"type": "module",
8-
"main": "index.js",
9-
"types": "invoker.d.ts",
1012
"exports": {
1113
".": {
1214
"types": "./invoker.d.ts",
@@ -19,17 +21,22 @@
1921
"import": "./invoker.js"
2022
}
2123
},
22-
"repository": {
23-
"type": "git",
24-
"url": "git+https://github.com/keithamus/invokers-polyfill.git"
24+
"main": "index.js",
25+
"types": "invoker.d.ts",
26+
"typesVersions": {
27+
"*": {
28+
"fn": [
29+
"./index-fn.d.ts"
30+
]
31+
}
2532
},
2633
"files": [
2734
"*.d.ts",
2835
"*.js"
2936
],
3037
"scripts": {
31-
"prepublishOnly": "npm run minify",
3238
"minify": "esbuild --bundle --minify index.js > invoker.min.js",
39+
"prepublishOnly": "npm run minify",
3340
"test": "echo TODO! Run ./wpt serve --inject-script=../invokers-polyfill/invoker.js for now."
3441
},
3542
"devDependencies": {

0 commit comments

Comments
 (0)