Skip to content

Commit

Permalink
fix(types): PageProps was missing type hints for paths (#1173)
Browse files Browse the repository at this point in the history
this fix brings back the autocomplete for `PageProps`:

<img width="638" alt="image"
src="https://github.com/user-attachments/assets/e8f8633b-4fb7-4323-bc31-9d31c145282f"
/>

this was just missed in an earlier refactor of the types

Co-authored-by: Tyler <[email protected]>
  • Loading branch information
tylersayshi and tylersayshi authored Jan 21, 2025
1 parent ecf1577 commit 4f2cdec
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export type GetSlugs<Route extends string> = _GetSlugs<Route>;

/** Paths with slugs as string literals */
export type PagePath<Config> = Config extends {
pages: { DO_NOT_USE_pages: { path: infer Path } };
pages: { path: infer Path };
}
? Path
: never;
Expand Down

0 comments on commit 4f2cdec

Please sign in to comment.