mirror of
https://github.com/documenso/documenso.git
synced 2025-11-13 00:03:33 +10:00
12 lines
489 B
TypeScript
12 lines
489 B
TypeScript
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);
|
|
};
|