Class CompilerContext

Hierarchy

  • CompilerContext

Constructors

Properties

config: {
    indent: boolean;
} = ...

Type declaration

  • indent: boolean
constVariables: Map<any, string> = ...
context: Map<string, any> = ...
initialiseVariables: string[] = []
maxReservedVariable: number = 10_000
preCode: string = ''

Code that is executed in the context, but before the actual function is generated. This helps for example to initialize dynamically some context variables.

reservedNames: Set<string> = ...
variableContext: {
    [name: string]: any;
} = {}

Type declaration

  • [name: string]: any

Methods

  • Parameters

    • functionCode: string
    • Rest ...args: string[]

    Returns any

  • Parameters

    • functionCode: string
    • Rest ...args: string[]

    Returns Function

  • Returns always the same variable name for the same value. The variable name should not be set afterwards.

    Parameters

    • value: any
    • name: string = 'constVar'

    Returns string

  • Parameters

    • name: string = 'var'
    • Optional value: any

    Returns string

Generated using TypeDoc