Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions packages/bun-types/bun.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8421,6 +8421,11 @@ declare module "bun" {
readonly name: string;
readonly kind: "exact" | "catch-all" | "optional-catch-all" | "dynamic";
readonly src: string;
/**
* Legacy name for {@link MatchedRoute.src} (same value)
* @deprecated Use src instead
*/
readonly scriptSrc: string;
}

/**
Expand Down
3 changes: 3 additions & 0 deletions test/integration/bun-types/fixture/fsrouter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@

const match = router.match("/");
expectType<string>(match?.name!);
// scriptSrc is the runtime's legacy name for src.
expectType<string>(match?.src!);
expectType<string>(match?.scriptSrc!);

Check warning on line 13 in test/integration/bun-types/fixture/fsrouter.ts

View check run for this annotation

Claude / Claude Code Review

PR description claims bun-types.test.ts changes that were not committed

The PR description says `bun-types.test.ts` gains a `Bun.FileSystemRouter` case with a shared `tsc`-spawning helper, and that `bun bd test` fails/passes on that new case — but the diff only touches `bun.d.ts` and `fixture/fsrouter.ts`; `bun-types.test.ts` is unchanged. The shipped fixture coverage is fine per the CLAUDE.md bun-types exception, so this is description-accuracy only: either drop the `bun-types.test.ts` paragraph from the description, or commit the described test case.
Comment thread
robobun marked this conversation as resolved.
expectType<string>(match?.pathname!);
expectType<Record<string, string>>(match?.query!);
expectType<Record<string, string>>(match?.params!);