Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "index"

Index

Interfaces

Type aliases

Functions

Object literals

Type aliases

NativeTypes

NativeTypes: { bigint: bigint; boolean: boolean; function: Function; null: null; number: number; object: object; string: string; symbol: symbol; undefined: undefined }

Type declaration

  • bigint: bigint
  • boolean: boolean
  • function: Function
  • null: null
  • number: number
  • object: object
  • string: string
  • symbol: symbol
  • undefined: undefined

Functions

Const F

  • F(): boolean

Const T

  • T(): boolean

Const literal

  • literal<T>(y: T): (Anonymous function)
  • Type parameters

    • T: string | number | boolean | object

    Parameters

    • y: T

    Returns (Anonymous function)

Object literals

Const aliases

aliases: object

optional

optional: (Anonymous function) = combiners.maybe

Check whether x satisfies predicate, or is nil

sum

sum: (Anonymous function) = combiners.or

Check whether x satisfies at least one of the predicates

tuple

tuple: (Anonymous function) = combiners.product

Check whether x is a tuple of type defined by fs

union

union: (Anonymous function) = combiners.or

Check whether x satisfies at least one of the predicates

Const always

always: object

F

F: F

Always fail

T

T: T

Always pass

any

any: T = T

Always pass

ignore

ignore: T = T

Always pass

Const combiners

combiners: object

Array

  • Array<T>(f: T): (Anonymous function)
  • Check whether all elements of x satisfy predicate

    Type parameters

    Parameters

    • f: T

    Returns (Anonymous function)

Struct

  • Struct<Struct>(struct: Struct): (Anonymous function)
  • Check the structure of an object to match a given predicate

    Type parameters

    Parameters

    • struct: Struct

    Returns (Anonymous function)

and

  • and<Predicates, GuardUnion>(fs: Predicates): (Anonymous function)
  • Check whether x satisfies all predicates

    Type parameters

    • Predicates: Predicate[]

    • GuardUnion: PredicatesToGuards<Predicates>[number]

    Parameters

    • fs: Predicates

    Returns (Anonymous function)

either

  • either<T, U>(f: T, g: U): (Anonymous function)
  • Check whether x satisfies either of two types

    Type parameters

    Parameters

    • f: T
    • g: U

    Returns (Anonymous function)

exclude

  • exclude<T, U>(f: T, g: U): (Anonymous function)
  • Exclude type represented by g from type represented by f

    Type parameters

    Parameters

    • f: T
    • g: U

    Returns (Anonymous function)

maybe

  • maybe<T>(f: T): (Anonymous function)
  • Check whether x satisfies predicate, or is nil

    Type parameters

    Parameters

    • f: T

    Returns (Anonymous function)

not

  • not<T>(f: T): (Anonymous function)

or

  • or<Predicates, GuardUnion>(fs: Predicates): (Anonymous function)
  • Check whether x satisfies at least one of the predicates

    Type parameters

    • Predicates: Predicate[]

    • GuardUnion: PredicatesToGuards<Predicates>[number]

    Parameters

    • fs: Predicates

    Returns (Anonymous function)

product

  • product<Predicates, GuardTuple>(fs: Predicates): (Anonymous function)

refinement

  • refinement<T, U>(f: T, g: U): (Anonymous function)
  • Check whether x satisfies a base type and a refinement

    Type parameters

    Parameters

    • f: T
    • g: U

    Returns (Anonymous function)

Const primitives

primitives: object

bool

  • bool(x: any): x is boolean
  • Check whether x is a boolean

    Parameters

    • x: any

    Returns x is boolean

nil

  • nil(x: any): x is Nil
  • Check whether x is null or undefined

    Parameters

    • x: any

    Returns x is Nil

null

  • null(x: any): x is null
  • Check whether x is null

    Parameters

    • x: any

    Returns x is null

number

  • number(x: any): x is number
  • Check whether x is a number

    Parameters

    • x: any

    Returns x is number

object

  • object(x: any): x is object
  • Check whether x is an object

    Parameters

    • x: any

    Returns x is object

string

  • string(x: any): x is string
  • Check whether x is a string

    Parameters

    • x: any

    Returns x is string

symbol

  • symbol(x: any): x is symbol
  • Check whether x is a symbol

    Parameters

    • x: any

    Returns x is symbol

undefined

  • undefined(x: any): x is undefined
  • Check whether x is undefined

    Parameters

    • x: any

    Returns x is undefined

Const runtime

runtime: object

equals

equals: literal = literal

Literal equality of string, number, boolean, or object

literal

literal: literal

Literal equality of string, number, boolean, or object

is

  • is<T>(X: T): (Anonymous function)
  • Check whether x is an instanceof X

    Type parameters

    Parameters

    • X: T

    Returns (Anonymous function)

stringTag

  • stringTag<T>(type: T): (Anonymous function)
  • Check whether x has a [Symbol.toStringTag] value equal to type

    Type parameters

    • T: string

    Parameters

    • type: T

    Returns (Anonymous function)

type

  • type<T>(name: T): (Anonymous function)
  • Check whether x is of type name, which is a possible typeof string, or "null"

    Type parameters

    Parameters

    • name: T

    Returns (Anonymous function)

Generated using TypeDoc