Skip to content

makeSchema

const makeSchema: <TSchema>(schema) => ForRecord<TSchema["_EventDefMapType"]>

Defined in: packages/@livestore/common/dist/schema/LiveStoreEvent/input.d.ts:45

Creates an Effect Schema union for all event types in a schema (input format, no sequence numbers).

TSchema extends LiveStoreSchema

TSchema

ForRecord<TSchema["_EventDefMapType"]>

const inputSchema = LiveStoreEvent.Input.makeSchema(schema)
const event = Schema.decodeUnknownSync(inputSchema)(rawEvent)