Skip to content

Commit 9d2d66a

Browse files
authored
Re-add TypeScript definitions for better type support (#1149)
Signed-off-by: Sora Morimoto <[email protected]>
1 parent b2f4b50 commit 9d2d66a

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

Diff for: package.json

+3
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,18 @@
1414
"exports": {
1515
".": {
1616
"import": {
17+
"types": "./dist/index.d.ts",
1718
"default": "./dist/lib.js"
1819
},
1920
"require": {
21+
"types": "./dist/index.d.cts",
2022
"default": "./dist/lib.cjs"
2123
}
2224
}
2325
},
2426
"main": "./dist/lib.cjs",
2527
"module": "./dist/lib.js",
28+
"types": "./dist/index.d.cts",
2629
"bin": {
2730
"sta": "./dist/cli.js",
2831
"swagger-typescript-api": "./dist/cli.js"

Diff for: tsup.config.ts

+6
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ export default defineConfig({
55
lib: "src/index.ts",
66
cli: "index.ts",
77
},
8+
dts: {
9+
entry: "src/index.ts",
10+
compilerOptions: {
11+
noCheck: true,
12+
},
13+
},
814
clean: true,
915
format: ["esm", "cjs"],
1016
minify: true,

0 commit comments

Comments
 (0)