UNPKG

svelte-draft

Version:
19 lines (18 loc) 781 B
import { NodePath } from "@babel/traverse"; import { BlockStatement, Program, ImportDeclaration } from "@babel/types"; import { Transcriber, ITranscriber } from "typedraft"; export interface ISvelteTranscriber extends ITranscriber { m_Path: NodePath<Program>; } export declare class SvelteTranscriber extends Transcriber { constructor(code: string); get m_Path(): NodePath<Program>; ExtractModuleContext(): string; TranscribeToSections(): { import_section: string; script_section: string; template_section: string; }; } export declare function FindAllImport(program: NodePath<Program>): NodePath<ImportDeclaration>[]; export declare function FindComponentBody(program: NodePath<Program>): NodePath<BlockStatement>;