import type { Component, Snippet } from 'svelte'; export declare function isComponent(value: Component | Snippet): value is Component; export declare function isSnippet(value: Component | Snippet): value is Snippet; export type SnippetArgs = T extends Snippet ? U : never; type SnippetParams = T extends Snippet ? P : never; type PreserveArrayTypes = { [K in keyof T]: T[K]; }; type ParamsType = T extends [any] ? T[0] : PreserveArrayTypes; /** * Binds a snippet to a set of parameters * * @example * * // Original snippet with multiple parameters * {#snippet MainSnip(param1: string, param2: string)} *
{param1} {param2}
* {/snippet} * * // Convert to single param snippet with fixed second param * const SnippetWithParam = useSnippet(MainSnip, "Bruzz") * // or with multiple fixed params * const SnippetWithParam2 = useSnippet(MainSnip, ["Bruzz", "Hello"]) * * // Can now use with just one parameter * banner({title: "Hello"}, SnippetWithParam) * banner({title: "Hello"}, SnippetWithParam2) * * @param snippet - The original multi-parameter snippet to convert * @param params - Fixed values for additional parameters * @returns A snippet that can be called with a `@render` tag */ export declare function useSnippet>(snippet: T, params: ParamsType>): Snippet; export {};