Skip to content

Commit 9eea4fb

Browse files
committed
Fix types
1 parent b0674d3 commit 9eea4fb

File tree

4 files changed

+10
-3
lines changed

4 files changed

+10
-3
lines changed

index.d.ts

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
declare global {
2+
var alert: (message?: string) => void;
3+
var confirm: (message?: string) => boolean;
4+
var prompt: (message?: string, default_?: string) => string | null;
5+
}
6+
7+
export {};

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
],
2121
"type": "module",
2222
"exports": {
23-
"types": "./dist/index.d.ts",
23+
"types": "./index.d.ts",
2424
"default": "./dist/index.js"
2525
},
2626
"files": [

src/index.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
// @ts-nocheck
21
import alert from "./alert.ts";
32
import confirm from "./confirm.ts";
43
import prompt from "./prompt.ts";

tsconfig.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@
44
"module": "ESNext",
55
"target": "ESNext",
66
"moduleResolution": "bundler",
7+
"lib": ["ESNext"],
78
"skipLibCheck": true,
89
"allowSyntheticDefaultImports": true,
910
"esModuleInterop": true,
1011
"allowArbitraryExtensions": true,
1112
"allowImportingTsExtensions": true
1213
},
13-
"include": ["src", "test", "vite.config.ts"],
14+
"include": ["src", "test", "vite.config.ts", "index.d.ts"],
1415
"exclude": ["node_modules"]
1516
}

0 commit comments

Comments
 (0)