Code that is executed in the context, but before the actual function is generated.
This helps for example to initialize dynamically some context variables.
ProtectedreservedNames
reservedNames:Set<string> = ...
ProtectedvariableContext
variableContext:{ [name: string]: any; } = {}
Type declaration
[name: string]: any
Methods
build
build(functionCode: string, ...args: string[]): any
Parameters
functionCode: string
Rest...args: string[]
Returns any
buildAsync
buildAsync(functionCode: string, ...args: string[]): Function
Parameters
functionCode: string
Rest...args: string[]
Returns Function
Protectedformat
format(code: string): string
Parameters
code: string
Returns string
raw
raw(functionCode: string): Function
Parameters
functionCode: string
Returns Function
reserveConst
reserveConst(value: any, name?: string): string
Returns always the same variable name for the same value.
The variable name should not be set afterwards.
Code that is executed in the context, but before the actual function is generated. This helps for example to initialize dynamically some context variables.