mirror of
https://github.com/documenso/documenso.git
synced 2025-11-14 08:42:12 +10:00
feat: onepage inbox
This commit is contained in:
11
packages/prisma/guards/is-extended-document-status.ts
Normal file
11
packages/prisma/guards/is-extended-document-status.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { ExtendedDocumentStatus } from '../types/extended-document-status';
|
||||
|
||||
export const isExtendedDocumentStatus = (value: unknown): value is ExtendedDocumentStatus => {
|
||||
if (typeof value !== 'string') {
|
||||
return false;
|
||||
}
|
||||
|
||||
// We're using the assertion for a type-guard so it's safe to ignore the eslint warning
|
||||
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
||||
return Object.values(ExtendedDocumentStatus).includes(value as ExtendedDocumentStatus);
|
||||
};
|
||||
Reference in New Issue
Block a user