Surface / foldkit-surface/writes

WritesOptions

interface · packages/surface/src/writes.ts:43

interface WritesOptions {
  readonly contracts?: ReadonlyArray<WritesContract> | undefined
  readonly writers?:
    Readonly<Record<string, ReadonlyArray<ReadonlyArray<string>>>> | undefined
}

Additional writers contributed alongside a Machine to Writes.of.

Members

WritesOptions.contracts

property · packages/surface/src/writes.ts:52

readonly contracts?: ReadonlyArray<WritesContract> | undefined

Contracts whose Messages write their owned Model paths (e.g. a Remote domain whose reducer Messages write ['remote']). Any reader under those paths — including a Projection.derive over a Remote read or a plain reference into the store — is reached by those Messages. A Message named here has no transition: Writes.of throws for one that has, since its transition already says what it writes.

WritesOptions.writers

property · packages/surface/src/writes.ts:54

readonly writers?:
  Readonly<Record<string, ReadonlyArray<ReadonlyArray<string>>>> | undefined

Extra Message-to-paths declarations for Messages outside machine.transitions.