Skip to content

fix(hook): type-check apps/hook/server and fix vibe-plan.ts narrowing - #1720

Merged
backnotprop merged 1 commit into
mainfrom
fix/hook-server-typecheck
Oct 5, 2026
Merged

backnotprop merged 1 commit into
mainfrom
fix/hook-server-typecheck

Conversation

@backnotprop

Copy link
Copy Markdown
Owner

apps/hook/server/vibe-plan.ts failed to type-check on main (from #1480). The plan path was declared unknown, so if (!target) narrowed it to {}, and the three calls after it that take a string failed (TS2345 x2, TS2322 x1). It is now string | undefined. Runtime behavior does not change.

The error got in because bun run typecheck never checked apps/hook/server. This PR adds apps/hook/tsconfig.server.json and runs it from the root typecheck script. The new config:

  • covers server/**/*.ts and excludes tests
  • uses strict and bun-types, the same settings as packages/server/tsconfig.json

With 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 typecheck passes
  • bun test apps/hook: 497 pass, 0 fail

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.
@backnotprop
backnotprop merged commit 3ebeaf0 into main Oct 5, 2026
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant