Remote / foldkit-remote/testing

LawConfig

interface · packages/remote/src/law.ts:41

interface LawConfig<AppModel> {
  readonly model: AppModel
  readonly holds: ReadonlyArray<{
    readonly entity: AnyEntity
    readonly ids: ReadonlyArray<string>
  }>
  readonly lists?: ReadonlyArray<QueryRef<string, unknown>> | undefined
  readonly mutation: MutationDescriptor<string, any, any, any>
  readonly input: unknown
  readonly now: number
}

Members

LawConfig.model

property · packages/remote/src/law.ts:43

readonly model: AppModel

The application's Model before the client holds anything; Remote.make's viewer reads it.

LawConfig.holds

property · packages/remote/src/law.ts:45

readonly holds: ReadonlyArray<{
  readonly entity: AnyEntity
  readonly ids: ReadonlyArray<string>
}>

The rows the client holds, each read whole as the server's principal sees it.

LawConfig.lists

property · packages/remote/src/law.ts:47

readonly lists?: ReadonlyArray<QueryRef<string, unknown>> | undefined

Lists the client holds, wholly loaded, whose placements are compared.

LawConfig.mutation

property · packages/remote/src/law.ts:48

readonly mutation: MutationDescriptor<string, any, any, any>

LawConfig.input

property · packages/remote/src/law.ts:49

readonly input: unknown

LawConfig.now

property · packages/remote/src/law.ts:51

readonly now: number

When the reader acted: what the client predicts with and the request sends.