Skip to content

Commit

Permalink
docs: mention page state (#13348)
Browse files Browse the repository at this point in the history
  • Loading branch information
eltigerchino authored Jan 20, 2025
1 parent 702575e commit 18d69fb
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions packages/kit/src/exports/public.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1088,31 +1088,31 @@ export interface AfterNavigate extends Omit<Navigation, 'type'> {
}

/**
* The shape of the `$page` store
* The shape of the [`page`](https://svelte.dev/docs/kit/$app-state#page) reactive object and the [`$page`](https://svelte.dev/docs/kit/$app-stores) store.
*/
export interface Page<
Params extends Record<string, string> = Record<string, string>,
RouteId extends string | null = string | null
> {
/**
* The URL of the current page
* The URL of the current page.
*/
url: URL;
/**
* The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object
* The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object.
*/
params: Params;
/**
* Info about the current route
* Info about the current route.
*/
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]`.
*/
id: RouteId;
};
/**
* Http status code of the current page
* HTTP status code of the current page.
*/
status: number;
/**
Expand Down
12 changes: 6 additions & 6 deletions packages/kit/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1070,31 +1070,31 @@ declare module '@sveltejs/kit' {
}

/**
* The shape of the `$page` store
* The shape of the [`page`](https://svelte.dev/docs/kit/$app-state#page) reactive object and the [`$page`](https://svelte.dev/docs/kit/$app-stores) store.
*/
export interface Page<
Params extends Record<string, string> = Record<string, string>,
RouteId extends string | null = string | null
> {
/**
* The URL of the current page
* The URL of the current page.
*/
url: URL;
/**
* The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object
* The parameters of the current page - e.g. for a route like `/blog/[slug]`, a `{ slug: string }` object.
*/
params: Params;
/**
* Info about the current route
* Info about the current route.
*/
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]`.
*/
id: RouteId;
};
/**
* Http status code of the current page
* HTTP status code of the current page.
*/
status: number;
/**
Expand Down

0 comments on commit 18d69fb

Please sign in to comment.