Presupuestador_web/shared/lib/contexts/common/domain/entities/NullableValueObject.ts

12 lines
345 B
TypeScript
Raw Normal View History

2024-04-23 15:29:38 +00:00
import { NullOr } from "../../../../utilities";
import { IValueObjectOptions, ValueObject } from "./ValueObject";
export interface INullableValueObjectOptions extends IValueObjectOptions {}
export abstract class NullableValueObject<T> extends ValueObject<NullOr<T>> {
public isNull = (): boolean => {
return this.props === null;
};
}