|
|
|
@ -411,12 +411,12 @@ declare module 'svelte' {
|
|
|
|
|
* */
|
|
|
|
|
export function afterUpdate(fn: () => void): void;
|
|
|
|
|
/**
|
|
|
|
|
* The `onFrame` function schedules a callback to run on `requestAnimationFrame`. It must be called inside an effect (e.g. during component initialisation).
|
|
|
|
|
* The `onAnimationFrame` function schedules a callback to run on `requestAnimationFrame`. It must be called inside an effect (e.g. during component initialisation).
|
|
|
|
|
*
|
|
|
|
|
* `onFrame` does not run inside [server-side components](https://svelte.dev/docs/svelte/svelte-server#render).
|
|
|
|
|
* `onAnimationFrame` does not run inside [server-side components](https://svelte.dev/docs/svelte/svelte-server#render).
|
|
|
|
|
*
|
|
|
|
|
* */
|
|
|
|
|
export function onFrame<T>(fn: () => NotFunction<T> | Promise<NotFunction<T>> | (() => any)): void;
|
|
|
|
|
export function onAnimationFrame<T>(fn: () => NotFunction<T> | Promise<NotFunction<T>> | (() => any)): void;
|
|
|
|
|
/**
|
|
|
|
|
* Create a snippet programmatically
|
|
|
|
|
* */
|
|
|
|
|