Repository navigation
fix(hook): type-check apps/hook/server and fix vibe-plan.ts narrowing - #1720
Merged
Merged
Conversation
The plan path in vibe-plan.ts was declared unknown, so the truthiness
check narrowed it to {} and three calls that take a string failed to
type-check (TS2345 x2, TS2322). No runtime effect.
The root typecheck never covered apps/hook/server, which is how the
error landed. Add apps/hook/tsconfig.server.json (strict, bun-types,
tests excluded, the same settings packages/server uses) and run it from
bun run typecheck. With the vibe-plan fix the server code is clean.
1 task
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.
apps/hook/server/vibe-plan.tsfailed to type-check on main (from #1480). The plan path was declaredunknown, soif (!target)narrowed it to{}, and the three calls after it that take a string failed (TS2345 x2, TS2322 x1). It is nowstring | undefined. Runtime behavior does not change.The error got in because
bun run typechecknever checkedapps/hook/server. This PR addsapps/hook/tsconfig.server.jsonand runs it from the roottypecheckscript. The new config:server/**/*.tsand excludes testsstrictandbun-types, the same settings aspackages/server/tsconfig.jsonWith the vibe-plan fix, the server code has no other type errors under TS 5.8.3 (apps/hook's pinned version) or 6.0.3. If I revert the fix, the new config reports the three original errors, so this check would have caught them.
Checks:
bun run typecheckpassesbun test apps/hook: 497 pass, 0 fail