From 81801582e9d49705a3d78c02113aac8b1019f925 Mon Sep 17 00:00:00 2001 From: Adria Navarro Date: Tue, 14 May 2024 17:43:42 +0200 Subject: [PATCH] Add type guards --- packages/shared-core/src/helpers/schema.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/shared-core/src/helpers/schema.ts b/packages/shared-core/src/helpers/schema.ts index 985e068be0..ad4c237247 100644 --- a/packages/shared-core/src/helpers/schema.ts +++ b/packages/shared-core/src/helpers/schema.ts @@ -6,7 +6,10 @@ import { export function isDeprecatedSingleUserColumn( schema: Pick -) { +): schema is { + type: FieldType.BB_REFERENCE + subtype: BBReferenceFieldSubType.USER +} { const result = schema.type === FieldType.BB_REFERENCE && schema.subtype === BBReferenceFieldSubType.USER &&