-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
docs: explain why route id can be null #13581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
You've edited the generated file. You need to instead update |
packages/kit/types/index.d.ts
Outdated
| route: { | ||
| /** | ||
| * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]` | ||
| * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is null when the router fails to match a route. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can tweak this to be a bit more concise and avoid the word "fails" which might indicate some error occurred rather than expected behavior
| * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. It is null when the router fails to match a route. | |
| * The ID of the current route - e.g. for `src/routes/blog/[slug]`, it would be `/blog/[slug]`. The ID is `null` when no route is matched. |
This reverts commit be452ea.
|
Rich-Harris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
accepted ben's suggestion and applied the changes to public.d.ts. thanks!
I couldn't get symlinks to work so I'm just winging it :/
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
pnpm testand lint the project withpnpm lintandpnpm checkChangesets
pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.Edits