import MagicString from 'magic-string'; import { preprocess } from 'svelte/compiler'; import { MagicSFCOptions, MagicSFC as MagicSFC$1, MagicBlock, SourceLocation } from './index.js'; import { BaseNode } from 'svelte/types/compiler/interfaces'; type SveltePreprocessFunction = typeof preprocess; interface SveltePreprocessBlock { parsed: { attributes?: Record; content?: string; markup?: string; filename?: string; }; attrs?: Record; loc: SourceLocation; } interface MagicSvelteSFCOptions extends MagicSFCOptions { parser?: SveltePreprocessFunction; silent?: boolean; } declare const magicSvelteSfcOptions: MagicSvelteSFCOptions; declare class MagicSFC extends MagicSFC$1 { options: MagicSvelteSFCOptions; parsed: undefined; templates: MagicBlock[]; scripts: MagicBlock[]; styles: MagicBlock[]; constructor(source: string | MagicString, userOptions?: T, defaultOptions?: MagicSvelteSFCOptions); parse(): Promise>; } interface WriteableSFCBlock extends Partial { content?: string; src?: string; [key: string]: any; } interface WriteableDescriptor { templates?: WriteableSFCBlock[]; scripts?: WriteableSFCBlock[]; styles?: WriteableSFCBlock[]; } interface CreateSvelteSFCOptions extends Partial { } declare function createBlock(block: WriteableSFCBlock, blockType: keyof WriteableDescriptor): string; declare function createSFC(options?: CreateSvelteSFCOptions): MagicSFC; export { MagicSFC, type MagicSvelteSFCOptions, createBlock, createSFC, magicSvelteSfcOptions };