Options
All
  • Public
  • Public/Protected
  • All
Menu

External module expressions

Introduction

The 'piweb.expressions' module returns the result of a system variable expression. The evaluation result depends on the context of the calling variable, as well as the current page state and many other parameters. Just like the other data provider methods.

import * as piweb from 'piweb';
import expressions = piweb.expressions;

Index

Type aliases

ExpressionDataType

The cumulated possible return types of an expression.

SimpleExpressionData

SimpleExpressionData: string | number | Date | undefined

The possible simple return types of an expression.

Variables

Private internalProvider

internalProvider: any = require.binding('DataImageProvider')

Functions

evaluate

  • Evaluates the specified expression and returns the result untyped.

    Parameters

    • expression: string

    Returns ExpressionDataType

evaluateAsArray

  • Evaluates the specified expression and returns the result as array or undefined, in case the result wasn't an array of any kind.

    Parameters

    • expression: string

      The expression to evaluate.

    Returns ExpressionDataArray | undefined

evaluateAsDate

  • evaluateAsDate(expression: string): Date | undefined
  • Evaluates the specified expression and returns the result as date or undefined, in case the result can't be converted into a date representation.

    Parameters

    • expression: string

      The expression to evaluate.

    Returns Date | undefined

evaluateAsNumber

  • evaluateAsNumber(expression: string): number | undefined
  • Evaluates the specified expression and returns the result as number or undefined, in case the result can't be converted into a number representation.

    Parameters

    • expression: string

      The expression to evaluate.

    Returns number | undefined

evaluateAsString

  • evaluateAsString(expression: string): string | undefined
  • Evaluates the specified expression and returns the result as string or undefined, in case the result can't be converted into a string representation.

    Parameters

    • expression: string

      The expression to evaluate.

    Returns string | undefined

Private readValue

  • Parameters

    • reader: BufferReader

    Returns ExpressionDataType

Generated using TypeDoc