From 2fc5317e9ded6b3ad695ae6b82d7d0a1067bea27 Mon Sep 17 00:00:00 2001 From: "Russ T. Fugal" Date: Wed, 19 Aug 2026 11:05:05 -0600 Subject: [PATCH] feat(tsconfig): enable erasableSyntaxOnly With the enums and parameter properties gone, turn on the flag that stops them coming back. Set in both configs rather than only the base: the build profile restates it so the published emit fails loudly if the base ever loses it. Verified after enabling: `bun run typecheck` clean, `bun run build` succeeds and dist/ still carries every declared exports entry point (index, advanced, schema, leveling, conf). --- tsconfig.build.json | 3 +++ tsconfig.json | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/tsconfig.build.json b/tsconfig.build.json index 6518ac9..20b354f 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -9,6 +9,9 @@ "module": "ESNext", "outDir": "dist", "rootDir": "src", + // Restated (not just inherited) so the published build fails loudly if the + // base config ever loses it. + "erasableSyntaxOnly": true, "declaration": true, "declarationMap": true, "sourceMap": true, diff --git a/tsconfig.json b/tsconfig.json index 62c82d0..57f1a51 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -28,6 +28,10 @@ "noPropertyAccessFromIndexSignature": true, "exactOptionalPropertyTypes": true, "noImplicitReturns": true, + // Reject the non-erasable TypeScript constructs (enums, namespaces, + // constructor parameter properties, `import =`). This library ships its + // source, and downstream consumers type-strip rather than compile it. + "erasableSyntaxOnly": true, // Cache "incremental": true, -- 2.54.0