Skip to content

docs: update navigation descriptions #13639

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

Merged
merged 2 commits into from
Aug 12, 2025
Merged
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
10 changes: 5 additions & 5 deletions packages/kit/src/exports/public.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1026,8 +1026,8 @@ export interface NavigationTarget {

/**
* - `enter`: The app has hydrated/started
* - `form`: The user submitted a `<form>` with a GET method
* - `leave`: The user is leaving the app by closing the tab or using the back/forward buttons to go to a different document
* - `form`: The user submitted a `<form method="GET">`
* - `leave`: The app is being left either because the tab is being closed or a navigation to a different document is occurring
* - `link`: Navigation was triggered by a link click
* - `goto`: Navigation was triggered by a `goto(...)` call or a redirect
* - `popstate`: Navigation was triggered by back/forward navigation
Expand All @@ -1045,7 +1045,7 @@ export interface Navigation {
to: NavigationTarget | null;
/**
* The type of navigation:
* - `form`: The user submitted a `<form>`
* - `form`: The user submitted a `<form method="GET">`
* - `leave`: The app is being left either because the tab is being closed or a navigation to a different document is occurring
* - `link`: Navigation was triggered by a link click
* - `goto`: Navigation was triggered by a `goto(...)` call or a redirect
Expand Down Expand Up @@ -1083,7 +1083,7 @@ export interface BeforeNavigate extends Navigation {
export interface OnNavigate extends Navigation {
/**
* The type of navigation:
* - `form`: The user submitted a `<form>`
* - `form`: The user submitted a `<form method="GET">`
* - `link`: Navigation was triggered by a link click
* - `goto`: Navigation was triggered by a `goto(...)` call or a redirect
* - `popstate`: Navigation was triggered by back/forward navigation
Expand All @@ -1102,7 +1102,7 @@ export interface AfterNavigate extends Omit<Navigation, 'type'> {
/**
* The type of navigation:
* - `enter`: The app has hydrated/started
* - `form`: The user submitted a `<form>`
* - `form`: The user submitted a `<form method="GET">`
* - `link`: Navigation was triggered by a link click
* - `goto`: Navigation was triggered by a `goto(...)` call or a redirect
* - `popstate`: Navigation was triggered by back/forward navigation
Expand Down
18 changes: 9 additions & 9 deletions packages/kit/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1008,8 +1008,8 @@ declare module '@sveltejs/kit' {

/**
* - `enter`: The app has hydrated/started
* - `form`: The user submitted a `<form>` with a GET method
* - `leave`: The user is leaving the app by closing the tab or using the back/forward buttons to go to a different document
* - `form`: The user submitted a `<form method="GET">`
* - `leave`: The app is being left either because the tab is being closed or a navigation to a different document is occurring
* - `link`: Navigation was triggered by a link click
* - `goto`: Navigation was triggered by a `goto(...)` call or a redirect
* - `popstate`: Navigation was triggered by back/forward navigation
Expand All @@ -1027,7 +1027,7 @@ declare module '@sveltejs/kit' {
to: NavigationTarget | null;
/**
* The type of navigation:
* - `form`: The user submitted a `<form>`
* - `form`: The user submitted a `<form method="GET">`
* - `leave`: The app is being left either because the tab is being closed or a navigation to a different document is occurring
* - `link`: Navigation was triggered by a link click
* - `goto`: Navigation was triggered by a `goto(...)` call or a redirect
Expand Down Expand Up @@ -1065,7 +1065,7 @@ declare module '@sveltejs/kit' {
export interface OnNavigate extends Navigation {
/**
* The type of navigation:
* - `form`: The user submitted a `<form>`
* - `form`: The user submitted a `<form method="GET">`
* - `link`: Navigation was triggered by a link click
* - `goto`: Navigation was triggered by a `goto(...)` call or a redirect
* - `popstate`: Navigation was triggered by back/forward navigation
Expand All @@ -1084,7 +1084,7 @@ declare module '@sveltejs/kit' {
/**
* The type of navigation:
* - `enter`: The app has hydrated/started
* - `form`: The user submitted a `<form>`
* - `form`: The user submitted a `<form method="GET">`
* - `link`: Navigation was triggered by a link click
* - `goto`: Navigation was triggered by a `goto(...)` call or a redirect
* - `popstate`: Navigation was triggered by back/forward navigation
Expand Down Expand Up @@ -1963,7 +1963,7 @@ declare module '@sveltejs/kit' {
* Checks whether this is an error thrown by {@link error}.
* @param status The status to filter for.
* */
export function isHttpError<T extends number>(e: unknown, status?: T | undefined): e is (HttpError_1 & {
export function isHttpError<T extends number>(e: unknown, status?: T): e is (HttpError_1 & {
status: T extends undefined ? never : T;
});
/**
Expand Down Expand Up @@ -1993,13 +1993,13 @@ declare module '@sveltejs/kit' {
* @param data The value that will be serialized as JSON.
* @param init Options such as `status` and `headers` that will be added to the response. `Content-Type: application/json` and `Content-Length` headers will be added automatically.
*/
export function json(data: any, init?: ResponseInit | undefined): Response;
export function json(data: any, init?: ResponseInit): Response;
/**
* Create a `Response` object from the supplied body.
* @param body The value that will be used as-is.
* @param init Options such as `status` and `headers` that will be added to the response. A `Content-Length` header will be added automatically.
*/
export function text(body: string, init?: ResponseInit | undefined): Response;
export function text(body: string, init?: ResponseInit): Response;
/**
* Create an `ActionFailure` object.
* @param status The [HTTP status code](https://developer.mozilla.org/en-US/docs/Web/HTTP/Status#client_error_responses). Must be in the range 400-599.
Expand Down Expand Up @@ -2298,7 +2298,7 @@ declare module '$app/navigation' {
invalidateAll?: boolean | undefined;
invalidate?: (string | URL | ((url: URL) => boolean))[] | undefined;
state?: App.PageState | undefined;
} | undefined): Promise<void>;
}): Promise<void>;
/**
* Causes any `load` functions belonging to the currently active page to re-run if they depend on the `url` in question, via `fetch` or `depends`. Returns a `Promise` that resolves when the page is subsequently updated.
*
Expand Down
Loading