pull/12425/head
Dominic Gannaway 2 years ago
parent 4e7279af5e
commit 12e5fe9f7d

@ -369,11 +369,10 @@ declare module 'svelte' {
* Create a snippet imperatively using mount, hyrdate and render functions. * Create a snippet imperatively using mount, hyrdate and render functions.
* */ * */
export function createRawSnippet<Params extends unknown[]>({ mount, hydrate }: { export function createRawSnippet<Params extends unknown[]>({ mount, hydrate }: {
mount: (...params: LazyParams<Params>) => Element; mount: (...params: Getters<Params>) => Element;
hydrate?: (element: Element, ...params: LazyParams<Params>) => void; hydrate?: (element: Element, ...params: Getters<Params>) => void;
render: (...params: Params) => string; render: (...params: Params) => string;
}): import("svelte").Snippet<Params>; }): import("svelte").Snippet<Params>;
type LazyParams<T> = { [K in keyof T]: () => T[K]; };
/** /**
* Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component. * Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.
* Transitions will play during the initial render unless the `intro` option is set to `false`. * Transitions will play during the initial render unless the `intro` option is set to `false`.
@ -459,6 +458,9 @@ declare module 'svelte' {
* https://svelte.dev/docs/svelte#getallcontexts * https://svelte.dev/docs/svelte#getallcontexts
* */ * */
export function getAllContexts<T extends Map<any, any> = Map<any, any>>(): T; export function getAllContexts<T extends Map<any, any> = Map<any, any>>(): T;
type Getters<T> = {
[K in keyof T]: () => T[K];
};
export { hydrate_1 as hydrate, mount_1 as mount }; export { hydrate_1 as hydrate, mount_1 as mount };
} }

Loading…
Cancel
Save