mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
(core) Use GristObjCode in CellValue
Summary: Makes type checking a bit stronger Test Plan: it just has to compile Reviewers: jarek Reviewed By: jarek Differential Revision: https://phab.getgrist.com/D3065
This commit is contained in:
@@ -1,4 +1,20 @@
|
||||
export type CellValue = number|string|boolean|null|[string, ...unknown[]];
|
||||
// Letter codes for CellValue types encoded as [code, args...] tuples.
|
||||
export const enum GristObjCode {
|
||||
List = 'L',
|
||||
Dict = 'O',
|
||||
DateTime = 'D',
|
||||
Date = 'd',
|
||||
Skip = 'S',
|
||||
Censored = 'C',
|
||||
Reference = 'R',
|
||||
ReferenceList = 'r',
|
||||
Exception = 'E',
|
||||
Pending = 'P',
|
||||
Unmarshallable = 'U',
|
||||
Versions = 'V',
|
||||
}
|
||||
|
||||
export type CellValue = number|string|boolean|null|[GristObjCode, ...unknown[]];
|
||||
|
||||
export interface RowRecord {
|
||||
id: number;
|
||||
|
||||
Reference in New Issue
Block a user