$ cnpm install @vuedx/compiler-tsx
A custom compiler to convert .vue to a TSX representation for type checking and IDE support.
npm add @vuedx/compiler-tsx
Signature:
export declare function compile(
source: string,
options: CompileOptions,
): Omit<CompileOutput, 'map'> & {
map: RawSourceMap
}
| Parameter | Type | Description |
|---|---|---|
| source | string |
- |
| options | CompileOptions |
- |
Signature:
export declare function compileWithDecodedSourceMap(
source: string,
options: CompileOptions,
): CompileOutput
| Parameter | Type | Description |
|---|---|---|
| source | string |
- |
| options | CompileOptions |
- |
export interface CompileOptions extends TransformOptions {}
export interface CompileOutput extends TransformedCode {
descriptor: SFCDescriptor
errors: Array<CompilerError | SyntaxError>
template?: RootNode
}
export interface CustomAttributeNode extends AttributeNode {
nameLoc: SourceLocation
}
export interface CustomBaseElementNode extends BaseElementNode {
endTagLoc?: SourceLocation
hoists?: CompoundExpressionNode[]
startTagLoc: SourceLocation
tagLoc: SourceLocation
}
export interface CustomNode extends Node {
scope: Scope
}
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.
Copyright 2013 - present © cnpmjs.org | Home |