Skip to content

Commit

Permalink
docs: note when init hook was added (#13138)
Browse files Browse the repository at this point in the history
* docs: note when `init` hook was added

* add `@since` tags

* on second thoughts, just use the tags
  • Loading branch information
Rich-Harris authored Dec 10, 2024
1 parent 07e346a commit 33600ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/kit/src/exports/public.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -726,11 +726,13 @@ export type HandleFetch = (input: {

/**
* The [`init`](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) will be invoked before the server responds to its first request
* @since 2.10.0
*/
export type ServerInit = () => MaybePromise<void>;

/**
* The [`init`](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) will be invoked once the app starts in the browser
* @since 2.10.0
*/
export type ClientInit = () => MaybePromise<void>;

Expand Down
2 changes: 2 additions & 0 deletions packages/kit/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -708,11 +708,13 @@ declare module '@sveltejs/kit' {

/**
* The [`init`](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) will be invoked before the server responds to its first request
* @since 2.10.0
*/
export type ServerInit = () => MaybePromise<void>;

/**
* The [`init`](https://svelte.dev/docs/kit/hooks#Shared-hooks-init) will be invoked once the app starts in the browser
* @since 2.10.0
*/
export type ClientInit = () => MaybePromise<void>;

Expand Down

0 comments on commit 33600ee

Please sign in to comment.