0.7.6 • Published 2 years ago

@vuedx/transforms v0.7.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Compiler TSX

A custom compiler to convert Vue template to a (functional) TSX representation for type checking.

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.

Usage

npm add @vuedx/compiler-tsx

API

compile

Signature:

declare function compile(template: string, options: Options & CompilerOptions): CodegenResult;
ParameterTypeDescription
templatestring-
optionsOptions & CompilerOptions-

parse

Signature:

declare function parse(template: string, options: ParserOptions): RootNode;
ParameterTypeDescription
templatestring-
optionsParserOptions-

Types

CodegenResult

interface CodegenResult extends CodegenResult$1 {
  errors: CompilerError[];
  expressions: Array<[number, number]>;
  mappings: Array<[number, number, number, number, number]>;
}

ComponentImport

interface ComponentImport {
  name?: string;
  named?: boolean;
  path: string;
}

Options

interface Options {
  components?: Record<string, ComponentImport>;
  filename: string;
}
0.7.6

2 years ago

0.7.5

2 years ago

0.7.4

2 years ago