Skip to content

Commit dded428

Browse files
clankmaxxing-clodjoncinqueclaude
authored
Fix types declaration entry path for clients/js (#647)
The package's `types` (and the `types` export condition) point to `./dist/types/index.d.ts`, but the build emitted the entry to `./dist/types/src/index.d.ts`, so consumers resolved no type declarations at all (attw: "No types" on node10, node16, and bundler). The cause was `include: ["src", "*.ts"]`: the `*.ts` glob pulled in `tsup.config.ts` at the package root, which raised the declaration rootDir to the package directory and prefixed all emitted declarations with `src/`. Setting `rootDir: "src"` and narrowing `include` to `["src"]` makes tsc emit the entry to the declared `./dist/types/index.d.ts`. Co-authored-by: Jon <jon@anza.xyz> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent bcee1e5 commit dded428

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

clients/js/tsconfig.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99
"incremental": false,
1010
"declaration": true,
1111
"declarationDir": "./dist/types",
12-
"emitDeclarationOnly": true
12+
"emitDeclarationOnly": true,
13+
"rootDir": "src"
1314
},
1415
"extends": ["@tsconfig/strictest/tsconfig.json"],
15-
"include": ["src", "*.ts"]
16+
"include": ["src"]
1617
}

0 commit comments

Comments
 (0)