Options
All
  • Public
  • Public/Protected
  • All
Menu

Function IF

Returns valueTrue or valueFalse, according argument selector. If selector is true, argument valueTrue will be executed and returned, otherwise argument valueFalse.

  • Name: IF

Signature:

IF((boolean|number), any, any) => any

Hierarchy

Implements

Index

Constructors

Private constructor

Methods

clone

execute

  • Parameters

    Returns any

executeAsync

  • executeAsync(preexcArguments: any[], environment: ScriptEnvironment, node: Node, execPath: string): Promise<any>
  • Parameters

    Returns Promise<any>

Protected getArgumentError

  • Returns the first argument with error inside args, if args is an array. Or args itself, if args is an object of ExpressionError (or derived).

    Parameters

    • args: any | any[]

    Returns ExpressionError | undefined

getDescription

  • getDescription(): string
  • Returns the description of this function. An empty string if a description is not available.

    Returns string

getName

  • getName(): string
  • Returns the name of the function

    Returns string

getOperator

  • getOperator(): string
  • Returns the operator-character of this function. Throws an error if this function is not useable as operation.

    Returns string

getPriority

  • getPriority(): number
  • Returns the priority of this function. Only needed for operators.

    Returns number

Protected hasArgumentError

  • hasArgumentError(args: any | any[]): boolean
  • Returns true if args is an ExpressionError-object or an array which contains an ExpressionError-object.

    Parameters

    • args: any | any[]

    Returns boolean

hasHigherPriorityThan

  • hasHigherPriorityThan(priority: number): boolean

isAsyncron

  • isAsyncron(): boolean
  • Returns true if this function must be called asyncron and returns the value not immediately.

    Returns boolean

isOperator

  • isOperator(): boolean
  • Returns true if this function is also available as operation (using operator)

    Returns boolean

isPreexecutedArgument

  • isPreexecutedArgument(index: number, node: Node): boolean
  • override

    Only pre-execute the first argument. Others are executed according this one argument.

    Parameters

    • index: number
    • node: Node

    Returns boolean

isStoring

  • isStoring(): boolean
  • Returns true if this function is storing values between the calls. So, an instance needs to be created for each occurrence.

    Returns boolean

toString

  • toString(): string

Static META

  • Returns Function_IF

Generated using TypeDoc