Options
All
  • Public
  • Public/Protected
  • All
Menu

Designed to carry the value of Data.

param whether

the datar is in HPMode, when in HPMode, the mutator of datar will always be Chaos.

Type parameters

  • V = any

Hierarchy

Index

Methods

Static of

Static empty

  • When we create a new datar instance with Datar.empty, its value will be VACUO for sure. But the reason we create a empty datar is to contain some type of value in the future. The const someDatar = Datar.empty() as Datar<any> seems inevitable. It is advisable to always set a initial value for any type of value.

    Parameters

    Returns Datar<Vacuo>

fill

  • fill(mutator: MutatorOfDatar<V>): Datar<V>

run

  • run<M>(mutator: M, data?: DataLike<V>, ...args: any[]): M["transformation"]
  • Rarely used, this method exists to ensure the symmetry of Datar and Mutator.

    Type parameters

    Parameters

    • mutator: M

      the mutator to be applied

    • Optional data: DataLike<V>
    • Rest ...args: any[]

      exists for the symmetry of Mutator.run

    Returns M["transformation"]

    transformation function of specified mutator

Constructors

constructor

  • new Datar<V>(value: V, mutator?: ValidMutatorOfDatar<V>, options?: DatarOptions): Datar<V>

Properties

isParticle

isParticle: true

value

value: V

options

options: Required<DatarOptions>

mutator

mutator: ValidMutatorOfDatar<V>

isVain

isVain: boolean

Accessors

type

particleType

isDatar

  • get isDatar(): true

isEmpty

  • get isEmpty(): boolean