Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • BasicEvaluatedExpression

Index

Constructors

Properties

array?: any[]
bigint?: bigint
bool?: boolean
falsy: boolean
getMemberRanges?: () => [number, number][]

Type declaration

    • (): [number, number][]
    • Returns [number, number][]

getMembers?: () => string[]

Type declaration

    • (): string[]
    • Returns string[]

getMembersOptionals?: () => boolean[]

Type declaration

    • (): boolean[]
    • Returns boolean[]

identifier?: string | VariableInfoInterface
nullish?: boolean
number?: number
postfix?: null | BasicEvaluatedExpression
prefix?: null | BasicEvaluatedExpression
range?: [number, number]
regExp?: RegExp
rootInfo?: string | VariableInfoInterface
sideEffects: boolean
string?: string
templateStringKind?: "raw" | "cooked"
truthy: boolean
type: number
wrappedInnerExpressions?: BasicEvaluatedExpression[]

Methods

  • asBool(): undefined | boolean
  • Creates a boolean representation of this evaluated expression.

    Returns undefined | boolean

  • asCompileTimeValue(): any
  • Gets the compile-time value of the expression

    Returns any

  • asNullish(): undefined | boolean
  • Creates a nullish coalescing representation of this evaluated expression.

    Returns undefined | boolean

  • asString(): undefined | string
  • Creates a string representation of this evaluated expression.

    Returns undefined | string

  • couldHaveSideEffects(): boolean
  • Can this expression have side effects?

    Returns boolean

  • isArray(): boolean
  • Returns boolean

  • isBigInt(): boolean
  • Returns boolean

  • isBoolean(): boolean
  • Returns boolean

  • isCompileTimeValue(): boolean
  • Is expression a runtime or compile-time value?

    Returns boolean

  • isConditional(): boolean
  • Returns boolean

  • isConstArray(): boolean
  • Returns boolean

  • isFalsy(): boolean
  • Returns boolean

  • isIdentifier(): boolean
  • Returns boolean

  • isNull(): boolean
  • Returns boolean

  • isNullish(): undefined | boolean
  • Returns undefined | boolean

  • isNumber(): boolean
  • Returns boolean

  • isPrimitiveType(): undefined | boolean
  • Is expression a primitive or an object type value?

    Returns undefined | boolean

  • isRegExp(): boolean
  • Returns boolean

  • isString(): boolean
  • Returns boolean

  • isTemplateString(): boolean
  • Returns boolean

  • isTruthy(): boolean
  • Returns boolean

  • isUndefined(): boolean
  • Returns boolean

  • isUnknown(): boolean
  • Returns boolean

  • isWrapped(): boolean
  • Returns boolean

  • Set's the value of this expression to an array of strings.

    Parameters

    • array: string[]

    Returns BasicEvaluatedExpression

  • Set's the value of this expression to a BigInt

    Parameters

    • bigint: bigint

    Returns BasicEvaluatedExpression

  • Set's the value of this expression to a boolean

    Parameters

    • bool: boolean

    Returns BasicEvaluatedExpression

  • Set's the value of this expression to a particular identifier and its members.

    Parameters

    • identifier: string | VariableInfoInterface
    • rootInfo: string | VariableInfoInterface
    • getMembers: () => string[]
        • (): string[]
        • Returns string[]

    • Optional getMembersOptionals: () => boolean[]
        • (): boolean[]
        • Returns boolean[]

    • Optional getMemberRanges: () => [number, number][]
        • (): [number, number][]
        • Returns [number, number][]

    Returns BasicEvaluatedExpression

  • Set's the value of the expression to nullish.

    Parameters

    • value: boolean

    Returns BasicEvaluatedExpression

  • Set's the value of this expression to a number

    Parameters

    • number: number

    Returns BasicEvaluatedExpression

  • Set's the range for the expression.

    Parameters

    • range: [number, number]

    Returns BasicEvaluatedExpression

  • Set's the value of this expression to a regular expression

    Parameters

    • regExp: RegExp

    Returns BasicEvaluatedExpression

  • Set whether or not the expression has side effects.

    Parameters

    • Optional sideEffects: boolean

    Returns BasicEvaluatedExpression