The combined parsing and transpilation customization. These properties affect the parsing and AST transformations before code generation.

Hierarchy

  • ParseOptions
    • TranspileOptions

Properties

attachComment?: boolean
binOp?: {
    [name: string]: OperatorTransform;
}

The replacements of binary operators that will be made. The name key is used to match the operator symbol. The mapped transform is used to specify the action to be performed.

Type declaration

comment?: boolean
jsx?: boolean
loc?: boolean

Determines whether the parser reports loc: {start:{line:number;column:number}; end:{line:number;column:number}}

namespace?: string

The namespace qualification to use for replacements of operators with functions.

noLoopCheck?: boolean

Used to determine whether timeout checks will be added to the code to prevent infinite loops.

range?: boolean

Determines whether the parser reports range: [start: number, end: number].

source?: string
sourceType?: "module" | "script"
timeout?: number

Specifies the timeout value in milliseconds if the code has loop checks inserted.

tokens?: boolean
tolerant?: boolean
unaryOp?: {
    [name: string]: OperatorTransform;
}

The replacements of unary operators that will be made. The name key is used to match the operator symbol. The mapped transform is used to specify the action to be performed.

Type declaration

Generated using TypeDoc