Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T = any

Hierarchy

  • Prism

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Prism<T>(value: undefined | T, path?: Path, warnings?: Warning[]): Prism<T>
  • Type parameters

    • T = any

    Parameters

    • value: undefined | T
    • path: Path = []
    • warnings: Warning[] = []

    Returns Prism<T>

Properties

Readonly exists

exists: boolean

Readonly path

path: Path

Readonly value

value: undefined | T

Readonly warnings

warnings: Warning[]

Methods

get

  • get<C>(key: PathKey, options?: { quiet?: boolean }): Prism<C>
  • Type parameters

    • C = any

    Parameters

    • key: PathKey
    • options: { quiet?: boolean } = {}
      • Optional quiet?: boolean

    Returns Prism<C>

has

toArray

  • toArray(): Prism<T[keyof T]>[]

transform

  • transform<C>(fn: (prism: Prism<T>) => C): Prism<C>
  • Type parameters

    • C = unknown

    Parameters

    • fn: (prism: Prism<T>) => C
        • Parameters

          Returns C

    Returns Prism<C>

warn

  • warn(error: Error, path?: Path): void
  • Parameters

    • error: Error
    • path: Path = []

    Returns void

Legend

  • Property
  • Method
  • Property

Generated using TypeDoc