(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:
Alex Hall
2021-10-07 23:02:51 +02:00
parent 62db263d1f
commit a64fb105e3
9 changed files with 58 additions and 49 deletions

View File

@@ -12,8 +12,8 @@ _ts_types = {
"Int": "number",
"PositionNumber": "number",
"Ref": "number",
"RefList": "['L', ...number[]]|null", # Non-primitive values are encoded
"ChoiceList": "['L', ...string[]]|null",
"RefList": "[GristObjCode.List, ...number[]]|null", # Non-primitive values are encoded
"ChoiceList": "[GristObjCode.List, ...string[]]|null",
"Text": "string",
}
@@ -24,6 +24,9 @@ def get_ts_type(col_type):
def main():
print("""\
/*** THIS FILE IS AUTO-GENERATED BY %s ***/
import { GristObjCode } from "app/plugin/GristData";
// tslint:disable:object-literal-key-quotes
export const SCHEMA_VERSION = %d;