Add type guards
This commit is contained in:
parent
180c197054
commit
81801582e9
|
@ -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 &&
|
||||
|
|
Loading…
Reference in New Issue