frontend/.pnpm-store/v3/files/a5/8aaca6a4cd96af0010182199b6a090cbcef25e3226644a8bff04517893f8e9f6803f75554f313d0cfdba17731d9038e992821589189bc2de5790fba494c17b

31 lines
909 B
Plaintext

export interface Processed {
code: string;
map?: string | object;
dependencies?: string[];
toString?: () => string;
}
export declare type MarkupPreprocessor = (options: {
content: string;
filename?: string;
}) => Processed | void | Promise<Processed | void>;
export declare type Preprocessor = (options: {
/**
* The script/style tag content
*/
content: string;
attributes: Record<string, string | boolean>;
/**
* The whole Svelte file content
*/
markup: string;
filename?: string;
}) => Processed | void | Promise<Processed | void>;
export interface PreprocessorGroup {
markup?: MarkupPreprocessor;
style?: Preprocessor;
script?: Preprocessor;
}
export interface SveltePreprocessor<PreprocessorType extends keyof PreprocessorGroup, Options = any> {
(options?: Options): Required<Pick<PreprocessorGroup, PreprocessorType>>;
}