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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
8 changes: 4 additions & 4 deletions packages/kit/src/exports/public.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1027,7 +1027,7 @@ 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
* - `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>` with a GET method
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is a little confusing as it raises the question of what about a POST request

Suggested change
* - `form`: The user submitted a `<form>` with a GET method
* - `form`: The user submitted a `<form>` with a GET request

* - `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>` with a GET method
* - `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>` with a GET method
* - `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
8 changes: 4 additions & 4 deletions packages/kit/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ 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
* - `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>` with a GET method
* - `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>` with a GET method
* - `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>` with a GET method
* - `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
Loading