UNPKG

embedded-typescript

Version:
20 lines (19 loc) 471 B
export interface Node { type: "header" | "text" | "expression" | "statement"; content: string; } interface Range { line: number; column: number; } export interface ParseError { error: string; position: { start: Range; end: Range; }; context: string; } export declare function isParseError(parsed: unknown | ParseError): parsed is ParseError; export declare function parse(template: string): Node[] | ParseError; export {};