Skip to main content

Type Alias: EntryIngestInput<TProps>

EntryIngestInput<TProps> = FlatEntryInput<TProps> | EntryInput<TProps>

Defined in: model/stored-entry.ts:186

What the Dataset constructor's entries option, entries.add(), entries.load(), entries.syncAll() and EntryDelta.upsert all take: a FlatEntryInput row, or a plain EntryInput row.

A function generic over TProps cannot name a FlatEntryInput<TProps> value, because that type's own flat-key check does not resolve until TProps is concrete (see FlatEntryInput's own comment above). EntryInput<TProps> carries no such check, so it resolves at every TProps, generic or concrete — this union lets a generic caller hand ingest a plain EntryInput<TProps> with no cast, while a caller with a concrete TProps still gets the flat-key check FlatEntryInput runs.

Type Parameters​

TProps​

TProps = Record<string, unknown>