Function enforceType

  • Enforces a type when receiving data from data source

    Returns

    The parsed value

    Parameters

    • value: unknown

      The value received from the data source

    • type: "string"

      The enforced type

    Returns string

  • Enforces a type when receiving data from data source

    Returns

    The parsed value

    Parameters

    • value: unknown

      The value received from the data source

    • type: "number" | "int"

      The enforced type

    Returns number

  • Enforces a type when receiving data from data source

    Returns

    The parsed value

    Parameters

    • value: unknown

      The value received from the data source

    • type: "boolean"

      The enforced type

    Returns boolean

  • Enforces a type when receiving data from data source

    Returns

    The parsed value

    Parameters

    • value: unknown

      The value received from the data source

    • type: "bigint"

      The enforced type

    Returns bigint

  • Enforces a type when receiving data from data source

    Returns

    The parsed value

    Parameters

    • value: unknown

      The value received from the data source

    • type: "date"

      The enforced type

    Returns Date

  • Enforces a type when receiving data from data source

    Returns

    The parsed value

    Parameters

    • value: unknown

      The value received from the data source

    • type: "object"

      The enforced type

    Returns any

  • Enforces a type when receiving data from data source

    Returns

    The parsed value

    Parameters

    • value: unknown

      The value received from the data source

    • type: "array"

      The enforced type

    Returns any[]

Generated using TypeDoc