From 375dea99f5a7d28c6fe4482b158c7ed8e02fe359 Mon Sep 17 00:00:00 2001 From: Gergo Magyar Date: Mon, 15 Jun 2026 17:23:54 +0000 Subject: [PATCH] build(ts): stripInternal so @internal test-only exports stay out of the shipped .d.ts (#2201 review R5) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit computeReachingDefsDense/computeReachingDefsSparse are exported only for the equivalence fuzz and tagged @internal, but `declaration: true` emitted them into the public dist/**/*.d.ts. stripInternal removes any @internal-tagged export from the declaration output. This is repo-wide, which is the intended behavior: the same applies to every other test-only @internal export (hf-env's withDownloadTimeout etc., worker-pool's buildDispatchMessage/crashSignature, parse-impl's handleWorkerStartupFailure, the logger/safe-parse test resets, and the new reaching-defs-graph SSA helpers) — all of which are documented as not-public. Verified: - declaration emit succeeds with no TS4094/TS9006 ("cannot be named") errors; - the @internal functions are gone from the emitted .d.ts (reaching-defs-graph.d.ts is now `export {};`), while public symbols (computeReachingDefs) remain; - gitnexus-web — the only cross-package consumer — typechecks clean and imports only from gitnexus-shared, never from gitnexus internals; - runtime .js and the vitest/tsx tests are source-based, so unaffected. Co-Authored-By: Claude Opus 4.8 (1M context) --- gitnexus/tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/gitnexus/tsconfig.json b/gitnexus/tsconfig.json index 6b82c6d7d..9a3fe9ccd 100644 --- a/gitnexus/tsconfig.json +++ b/gitnexus/tsconfig.json @@ -12,6 +12,7 @@ "resolveJsonModule": true, "forceConsistentCasingInFileNames": true, "declaration": true, + "stripInternal": true, "types": ["node"] }, "include": ["src/**/*"]