@@ -365,12 +365,20 @@ declare module 'svelte' {
365365export function flushSync ( fn ?: ( ( ) => void ) | undefined ) : void ;
366366/** Anything except a function */
367367type NotFunction < T > = T extends Function ? never : T ;
368+ /**
369+ * Create a snippet imperatively using mount, hyrdate and render functions.
370+ * */
371+ export function createRawSnippet ( { mount, hydrate } : {
372+ mount : ( ...params : any [ ] ) => Element ;
373+ hydrate ?: ( element : Element , ...params : any [ ] ) => void ;
374+ render : ( ...params : any [ ] ) => string ;
375+ } ) : ( anchor : TemplateNode , ...params : any [ ] ) => void ;
368376/**
369377 * Mounts a component to the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component.
370378 * Transitions will play during the initial render unless the `intro` option is set to `false`.
371379 *
372380 * */
373- export function mount < Props extends Record < string , any > , Exports extends Record < string , any > > ( component : ComponentType < SvelteComponent < Props > > | Component < Props , Exports , any > , options : { } extends Props ? {
381+ function mount_1 < Props extends Record < string , any > , Exports extends Record < string , any > > ( component : ComponentType < SvelteComponent < Props > > | Component < Props , Exports , any > , options : { } extends Props ? {
374382target : Document | Element | ShadowRoot ;
375383anchor ?: Node ;
376384props ?: Props ;
@@ -389,7 +397,7 @@ declare module 'svelte' {
389397 * Hydrates a component on the given target and returns the exports and potentially the props (if compiled with `accessors: true`) of the component
390398 *
391399 * */
392- export function hydrate < Props extends Record < string , any > , Exports extends Record < string , any > > ( component : ComponentType < SvelteComponent < Props > > | Component < Props , Exports , any > , options : { } extends Props ? {
400+ function hydrate_1 < Props extends Record < string , any > , Exports extends Record < string , any > > ( component : ComponentType < SvelteComponent < Props > > | Component < Props , Exports , any > , options : { } extends Props ? {
393401target : Document | Element | ShadowRoot ;
394402props ?: Props ;
395403events ?: Record < string , ( e : any ) => any > ;
@@ -450,8 +458,9 @@ declare module 'svelte' {
450458 * https://svelte.dev/docs/svelte#getallcontexts
451459 * */
452460export function getAllContexts < T extends Map < any , any > = Map < any , any > > ( ) : T ;
461+ type TemplateNode = Text | Element | Comment ;
453462
454- export { } ;
463+ export { hydrate_1 as hydrate , mount_1 as mount } ;
455464}
456465
457466declare module 'svelte/action' {
0 commit comments