Files
cfw-autumn/shared/utils/utils.ts
2025-09-24 12:18:09 +01:00

9 lines
257 B
TypeScript

export const nullish = <T>(
value: T | null | undefined,
): value is null | undefined => {
return value === null || value === undefined;
};
export const notNullish = <T>(value: T | null | undefined): value is T =>
value !== null && value !== undefined;