Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.
This repository was archived by the owner on May 19, 2025. It is now read-only.

Simplify InitialTimestamp() documentation #240

@lukepighetti

Description

@lukepighetti
type InitialTimestamp extends Number {
  validate() { initial(this, now) }
}

// Returns true if the value is intialized to init, or retains it's prior
// value, otherwise.
initial(value, init) { value == (prior(value) == null ? init : prior(value)) }

can be

type InitialTimestamp extends Number {
  validate() { prior(value) == null ? this == now : this == prior(this) }
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions