Skip to content

Commit c1cc45a

Browse files
authored
Fix TypeScript declaration file path (#1171)
Signed-off-by: Sora Morimoto <[email protected]>
1 parent b09070e commit c1cc45a

File tree

4 files changed

+430
-7
lines changed

4 files changed

+430
-7
lines changed

.changeset/true-lies-read.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"swagger-typescript-api": patch
3+
---
4+
5+
Fix TypeScript declaration file path.

package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@
1414
"exports": {
1515
".": {
1616
"import": {
17-
"types": "./dist/index.d.ts",
17+
"types": "./dist/lib.d.ts",
1818
"default": "./dist/lib.js"
1919
},
2020
"require": {
21-
"types": "./dist/index.d.cts",
21+
"types": "./dist/lib.d.cts",
2222
"default": "./dist/lib.cjs"
2323
}
2424
}
2525
},
2626
"main": "./dist/lib.cjs",
2727
"module": "./dist/lib.js",
28-
"types": "./dist/index.d.cts",
28+
"types": "./dist/lib.d.cts",
2929
"bin": {
3030
"sta": "./dist/cli.js",
3131
"swagger-typescript-api": "./dist/cli.js"
@@ -65,6 +65,7 @@
6565
"@biomejs/biome": "1.9.4",
6666
"@changesets/changelog-github": "0.5.1",
6767
"@changesets/cli": "2.28.1",
68+
"@microsoft/api-extractor": "7.52.3",
6869
"@tsconfig/node18": "18.2.4",
6970
"@tsconfig/strictest": "2.0.5",
7071
"@types/js-yaml": "4.0.9",

tsup.config.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,10 @@ export default defineConfig({
55
lib: "src/index.ts",
66
cli: "index.ts",
77
},
8-
dts: {
9-
entry: "src/index.ts",
8+
experimentalDts: {
9+
entry: {
10+
lib: "src/index.ts",
11+
},
1012
compilerOptions: {
1113
noCheck: true,
1214
},

0 commit comments

Comments
 (0)