chore(tsc): fix pre-existing type-check baseline#9
Merged
Conversation
Adds @types/node and @types/bun as devDependencies so the project-wide
tsc --noEmit pass actually succeeds. Previously it reported ~120 errors
across the codebase (missing process/Buffer/NodeJS namespace, missing
bun:test module, missing Bun global) which masked real type drift.
Three small follow-on fixes once the type names resolve:
- tsconfig module 'ES2022' -> 'ESNext' so import attributes
(with { type: 'json' }) compile
- render.test.ts Passage fixture: add the missing 'reference' field
and the missing 'number' field on the Verse (was a real shape bug
caught only after types resolved)
- domain test assertions: 'as string' cast on branded BookId values
before comparing against string literals via toBe
Test count: 99/99 -> 99/99 pass. tsc --noEmit: exits 0.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@types/nodeand@types/bunas devDependencies sobun run tsc --noEmitactually succeeds. Previously it reported ~120 errors across the codebase (missingprocess/Buffer/NodeJS.*/bun:test/Bun) which masked a real shape bug.tsconfig.modulefromES2022→ESNextso import attributes (with { type: "json" }) compile.src/cli/render.test.ts: thePassagefixture was missing the requiredreferencefield and theVersewas missingnumber: 16. Now constructsBookIdviamakeBookId("JHN")to respect Rule 6.as stringcasts on brandedBookIdvalues in two test files before comparing against string literals viatoBe. Rule 6 bansas BookId(casting INTO the brand); casting OUT for test comparison is fine.Test plan
bun run tsc --noEmitexits 0bun test— 99/99 passWhy now
Surfaced during the
feat/ts-native-architectureverify phase as a pre-existing warning. Carved out as its own PR because it's unrelated to the architectural change in #8 and shouldn't add noise to that review.