Options
All
  • Public
  • Public/Protected
  • All
Menu

Superstruct API Reference

Index

Classes

Interfaces

Type aliases

Variables

Functions

Object literals

Type aliases

Branch

Branch: Array<any>

Failure

Failure: object

Type declaration

  • [key: string]: any
  • branch: Branch
  • path: Path
  • type: string | undefined
  • value: any

Path

Path: Array<number | string>

Validator

Validator: function

Type declaration

Variables

Const struct

struct: Superstruct = superstruct()

Functions

Const isStruct

  • isStruct(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

Const superstruct

  • superstruct(settings?: Partial<SuperstructSettings>): Superstruct
  • Parameters

    • Default value settings: Partial<SuperstructSettings> = {}

    Returns Superstruct

Object literals

Const Types

Types: object

any

  • any(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

arguments

  • arguments(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

array

  • array(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

boolean

  • boolean(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

buffer

  • buffer(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

date

  • date(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

error

  • error(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

float32array

  • float32array(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

float64array

  • float64array(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

function

  • function(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

generatorfunction

  • generatorfunction(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

int16array

  • int16array(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

int32array

  • int32array(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

int8array

  • int8array(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

map

  • map(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

null

  • null(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

number

  • number(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

object

  • object(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

promise

  • promise(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

regexp

  • regexp(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

set

  • set(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

string

  • string(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

symbol

  • symbol(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

uint16array

  • uint16array(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

uint32array

  • uint32array(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

uint8array

  • uint8array(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

uint8clampedarray

  • uint8clampedarray(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

undefined

  • undefined(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

weakmap

  • weakmap(value: any): boolean
  • Parameters

    • value: any

    Returns boolean

weakset

  • weakset(value: any): boolean
  • Parameters

    • value: any

    Returns boolean