Compiler TSX
A custom compiler to convert Vue template to a (functional) TSX representation for type checking.
Usage
npm add @vuedx/compiler-tsx
API
More info
Signature:
declare function compile(template: string, options: Options & CompilerOptions): CodegenResult;
More info
Signature:
declare function parse(template: string, options: ParserOptions): RootNode;
Types
interface CodegenResult extends CodegenResult$1 {
errors: CompilerError[];
expressions: Array<[number, number]>;
mappings: Array<[number, number, number, number, number]>;
}
interface ComponentImport {
name?: string;
named?: boolean;
path: string;
}
interface Options {
components?: Record<string, ComponentImport>;
filename: string;
}
Support
This package is part of VueDX project, maintained by Rahul Kadyan. You can 💖 sponsor him for continued development of this package and other VueDX tools.