Add type guards
This commit is contained in:
parent
180c197054
commit
81801582e9
|
@ -6,7 +6,10 @@ import {
|
||||||
|
|
||||||
export function isDeprecatedSingleUserColumn(
|
export function isDeprecatedSingleUserColumn(
|
||||||
schema: Pick<FieldSchema, "type" | "subtype" | "constraints">
|
schema: Pick<FieldSchema, "type" | "subtype" | "constraints">
|
||||||
) {
|
): schema is {
|
||||||
|
type: FieldType.BB_REFERENCE
|
||||||
|
subtype: BBReferenceFieldSubType.USER
|
||||||
|
} {
|
||||||
const result =
|
const result =
|
||||||
schema.type === FieldType.BB_REFERENCE &&
|
schema.type === FieldType.BB_REFERENCE &&
|
||||||
schema.subtype === BBReferenceFieldSubType.USER &&
|
schema.subtype === BBReferenceFieldSubType.USER &&
|
||||||
|
|
Loading…
Reference in New Issue