svelte-trace
Version:
svelte-trace is a Svelte 5 preprocessor that enables 'click-to-open VS Code' functionality by adding metadata to HTML elements.
19 lines (18 loc) • 573 B
TypeScript
interface PreprocessorResult {
code: string;
map?: any;
}
interface MarkupParams {
content: string;
filename: string;
}
/**
* A preprocessor for Svelte files for tracking element's metadata. This function returns an object containing the preprocessor name, and a markup function.
*
* Set `openInCode` parameter to `false` if you don't want "Open in VSCode" functionality.
*/
export declare function svelteTrace(openInCode?: boolean): {
name: string;
markup: ({ content, filename }: MarkupParams) => PreprocessorResult | undefined;
};
export {};