From 4cf5ad7815681f730c6319ee8670762b9728766c Mon Sep 17 00:00:00 2001 From: Jon Date: Fri, 28 Aug 2026 12:16:12 +0000 Subject: [PATCH] Fix types declaration entry path for clients/js 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: Claude Opus 4.8 (1M context) --- clients/js/tsconfig.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/clients/js/tsconfig.json b/clients/js/tsconfig.json index 33e01a2c..bc41af63 100644 --- a/clients/js/tsconfig.json +++ b/clients/js/tsconfig.json @@ -9,8 +9,9 @@ "incremental": false, "declaration": true, "declarationDir": "./dist/types", - "emitDeclarationOnly": true + "emitDeclarationOnly": true, + "rootDir": "src" }, "extends": ["@tsconfig/strictest/tsconfig.json"], - "include": ["src", "*.ts"] + "include": ["src"] }