@vuedx/compiler-tsx
TypeScript icon, indicating that this package has built-in type declarations

0.8.1 • Public • Published

Compiler TSX

A custom compiler to convert .vue to a TSX representation for type checking and IDE support.

Usage

npm add @vuedx/compiler-tsx

API

compile

More info

Signature:

export declare function compile(
  source: string,
  options: CompileOptions,
): Omit<CompileOutput, 'map'> & {
  map: RawSourceMap
}
Parameter Type Description
source string -
options CompileOptions -

compileWithDecodedSourceMap

More info

Signature:

export declare function compileWithDecodedSourceMap(
  source: string,
  options: CompileOptions,
): CompileOutput
Parameter Type Description
source string -
options CompileOptions -

Types

CompileOptions

export interface CompileOptions extends TransformOptions {}

CompileOutput

export interface CompileOutput extends TransformedCode {
  descriptor: SFCDescriptor
  errors: Array<CompilerError | SyntaxError>
  template?: RootNode
}

CustomAttributeNode

export interface CustomAttributeNode extends AttributeNode {
  nameLoc: SourceLocation
}

CustomBaseElementNode

export interface CustomBaseElementNode extends BaseElementNode {
  endTagLoc?: SourceLocation
  hoists?: CompoundExpressionNode[]
  startTagLoc: SourceLocation
  tagLoc: SourceLocation
}

CustomNode

export interface CustomNode extends Node {
  scope: Scope
}

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.

Package Sidebar

Install

npm i @vuedx/compiler-tsx

Weekly Downloads

2,944

Version

0.8.1

License

MIT

Unpacked Size

952 kB

Total Files

69

Last publish

Collaborators

  • znck