Add type guards

This commit is contained in:
Adria Navarro 2024-05-14 17:43:42 +02:00
parent 180c197054
commit 81801582e9
1 changed files with 4 additions and 1 deletions

View File

@ -6,7 +6,10 @@ import {
export function isDeprecatedSingleUserColumn(
schema: Pick<FieldSchema, "type" | "subtype" | "constraints">
) {
): schema is {
type: FieldType.BB_REFERENCE
subtype: BBReferenceFieldSubType.USER
} {
const result =
schema.type === FieldType.BB_REFERENCE &&
schema.subtype === BBReferenceFieldSubType.USER &&