From cf28419cea7f4f40258272bd0154f414332e1210 Mon Sep 17 00:00:00 2001 From: Patrick <4031292+patmood@users.noreply.github.com> Date: Wed, 27 Nov 2024 20:57:17 +1100 Subject: [PATCH] fix types --- .github/workflows/test.yml | 1 + test/typecheck.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 90995f6..76a9932 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -25,3 +25,4 @@ jobs: - run: npm ci - run: npm run build - run: npm test + - run: npm run typecheck diff --git a/test/typecheck.ts b/test/typecheck.ts index ee9cf09..1006436 100644 --- a/test/typecheck.ts +++ b/test/typecheck.ts @@ -23,6 +23,7 @@ const thing = getOne(Collections.Everything, "a") // Works when passing in JSON generic const everythingRecordWithGeneric: EverythingRecord<{ a: "some string" }> = { + id: "abc", bool_field: true, json_field: { a: "some string" }, number_field: 1, @@ -30,6 +31,7 @@ const everythingRecordWithGeneric: EverythingRecord<{ a: "some string" }> = { // Works without passing in JSON generic const everythingRecordWithoutGeneric: EverythingRecord = { + id: "abc", bool_field: true, json_field: { a: "some string" }, number_field: 1, @@ -37,6 +39,7 @@ const everythingRecordWithoutGeneric: EverythingRecord = { // Test select option enums const selectOptions: EverythingRecord = { + id: "abc", select_field: EverythingSelectFieldOptions.optionA, select_field_no_values: "foo", }