|
|
@ -354,7 +354,7 @@ declare module 'svelte' {
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* If a function is returned _synchronously_ from `onMount`, it will be called when the component is unmounted.
|
|
|
|
* If a function is returned _synchronously_ from `onMount`, it will be called when the component is unmounted.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* `onMount` does not run inside a [server-side component](https://svelte.dev/docs#run-time-server-side-component-api).
|
|
|
|
* `onMount` does not run inside [server-side components](https://svelte.dev/docs/svelte/svelte-server#render).
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* */
|
|
|
|
* */
|
|
|
|
export function onMount<T>(fn: () => NotFunction<T> | Promise<NotFunction<T>> | (() => any)): void;
|
|
|
|
export function onMount<T>(fn: () => NotFunction<T> | Promise<NotFunction<T>> | (() => any)): void;
|
|
|
@ -367,7 +367,7 @@ declare module 'svelte' {
|
|
|
|
* */
|
|
|
|
* */
|
|
|
|
export function onDestroy(fn: () => any): void;
|
|
|
|
export function onDestroy(fn: () => any): void;
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs#template-syntax-component-directives-on-eventname).
|
|
|
|
* Creates an event dispatcher that can be used to dispatch [component events](https://svelte.dev/docs/svelte/legacy-on#Component-events).
|
|
|
|
* Event dispatchers are functions that can take two arguments: `name` and `detail`.
|
|
|
|
* Event dispatchers are functions that can take two arguments: `name` and `detail`.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Component events created with `createEventDispatcher` create a
|
|
|
|
* Component events created with `createEventDispatcher` create a
|
|
|
|