astro
Version:
Astro is a modern site builder with web best practices, performance, and DX front-of-mind.
12 lines (11 loc) • 380 B
TypeScript
export declare const SLOT_PREFIX = "___SLOTS___";
export interface SlotReplacement {
start: number;
end: number;
value: string;
}
/**
* Find every `<slot>` (excluding `is:inline` ones) and describe how to replace it
* with a `${___SLOTS___[name] ?? `fallback`}` template literal expression.
*/
export declare function collectSlots(code: string): SlotReplacement[];