Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UnitForm<T, U>

Type parameters

  • T

  • U = never

Hierarchy

  • Form<T, U>
    • UnitForm

Index

Constructors

constructor

  • new UnitForm<T, U>(form: Form<T, U>, unit: undefined | T): UnitForm<T, U>
  • Type parameters

    • T

    • U = never

    Parameters

    • form: Form<T, U>
    • unit: undefined | T

    Returns UnitForm<T, U>

Properties

Readonly form

form: Form<T, U>

Readonly tag

tag: undefined | string

Readonly unit

unit: undefined | T

Methods

cast

  • cast(item: Item, object?: T): undefined | T
  • Parameters

    • item: Item
    • Optional object: T

    Returns undefined | T

mold

  • mold(object: T | U, item?: Item): Item
  • Parameters

    • object: T | U
    • Optional item: Item

    Returns Item

withTag

  • withTag(tag: undefined | string): Form<T, U>
  • Parameters

    • tag: undefined | string

    Returns Form<T, U>

withUnit

  • withUnit(unit: undefined | T): Form<T, U>
  • Parameters

    • unit: undefined | T

    Returns Form<T, U>

Static forAny

  • Returns Form<AnyItem, never>

Static forBoolean

  • forBoolean(): Form<boolean, never>
  • Returns Form<boolean, never>

Static forItem

  • Returns Form<Item, AnyItem>

Static forNumber

  • forNumber(): Form<number, never>
  • Returns Form<number, never>

Static forString

  • forString(): Form<string, never>
  • Returns Form<string, never>

Static forValue

Generated using TypeDoc