Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Checks

Index

Type aliases

Variables

Functions

Type aliases

Condition

Condition: boolean | (() => boolean)

Variables

Const defaultMessage

defaultMessage: "Assertion failed" = "Assertion failed"

Functions

Const assert

  • assert(condition: Condition, message?: string): void
  • Assert that a condition is true, or throw an error

    throws

    {Error}

    Parameters

    • condition: Condition
    • Optional message: string

    Returns void

Const isObject

  • isObject(value: unknown): boolean
  • Detects if the value is an object type, excluding null or arrays.

    Parameters

    • value: unknown

    Returns boolean

Const isPrimitive

  • isPrimitive(value: unknown): boolean
  • Detects if the value is primitive, i.e. is null or not equal to an object

    Parameters

    • value: unknown

    Returns boolean

Generated using TypeDoc