Skip to content

EventDefFactInput

EventDefFactInput = string | readonly [string, any]

Defined in: packages/@livestore/common/dist/schema/EventDef/facts.d.ts:70

Input format for specifying a fact. Either a simple key string (value defaults to true) or a [key, value] tuple.

// Simple key (value = true)
const fact1: EventDefFactInput = 'todo:abc123'
// Key-value tuple
const fact2: EventDefFactInput = ['todo:abc123', { status: 'active' }]