vigiles API reference
    Preparing search index...

    Type Alias SeedStateOptions

    SeedStateOptions:
        | { ago: Duration; at?: never; value?: string }
        | { ago?: never; at: Date; value?: string }
        | { ago?: never; at?: never; value?: string }

    Options for HookStateHandle.seed.

    Spelled out as a three-way union rather than {value} & SeedWhen so the whole type is IN this declaration: a public signature that names a type a consumer cannot import is a surface you can read but not write against. The union is also what makes { ago, at } — two disagreeing answers to "when" — a tsc error; seedInstant throws on it as well, because harness tests are .mjs and a type does not run there.

    Type Declaration

    • { ago: Duration; at?: never; value?: string }

      Recorded that long ago — the reason this exists (a throttle needs an OLD fact).

    • { ago?: never; at: Date; value?: string }

      Recorded at exactly this instant.

    • { ago?: never; at?: never; value?: string }

      Recorded just now.