Skip to main content
Version: v10.0.0

CollectionOptions


Import
import { CollectionOptions } from "@hyper-fetch/db"

Preview​

type CollectionOptions<Row,KeyField> = {
key: KeyField;
validate?: client | all;
version?: Exclude<keyof Row & string, KeyField>;
}

Structure​

CollectionOptions
NameTypeDescription
key
KeyField

The field that identifies a row

validate
client | all

client validates client writes only, all validates data from the server too

version
Exclude<keyof Row & string, KeyField>

A field that grows with every change on the server. Writes never replace fields with a newer version.