Files
sign/packages/prisma/guards/is-signature-field.ts

10 lines
363 B
TypeScript
Raw Normal View History

2023-08-17 19:56:18 +10:00
import { FieldType } from '@prisma/client';
const SignatureFieldTypes = [FieldType.SIGNATURE, FieldType.FREE_SIGNATURE] as const;
type SignatureFieldType = (typeof SignatureFieldTypes)[number];
export const isSignatureFieldType = (type: FieldType): type is SignatureFieldType => {
return type === FieldType.SIGNATURE || type === FieldType.FREE_SIGNATURE;
};