Skip to content

cupertino-files / CellInput

Type Alias: CellInput

CellInput = TaggedCellInput | string | number | boolean | Date | null

Defined in: src/tst/tables.ts:435

A value to write into a cell.

The tagged forms are exact — { type: "duration", seconds } is the only way to say "45 minutes" rather than "the number 2700". Everything else has an obvious plain form, so a bare string, number, boolean, Date or null is accepted and normalised by normalizeCellInput.

Bare values were not accepted originally, and passing one silently cleared the cell: the tag was undefined, no case matched, and the record came out empty. Erasing data because a caller wrote the natural thing is not a tolerable failure mode, so plain values are now first class and anything genuinely unrecognised throws.

MIT licensed. Independently made — not by Apple in California. Not affiliated with or endorsed by Apple Inc.