ddd-tool-kit
Version:
A development tool kit for using Domain Driven Design in your Web API Node.js
13 lines (12 loc) • 642 B
TypeScript
import { ValueObject } from '../../../abstract/value-object/value-object.abstract';
import { IPasswordProps } from './password.props';
import { Output } from '../../../utils/output/output.util';
import { IError } from '../../../interfaces/error-message.interface';
export declare class PasswordValueObject extends ValueObject<IPasswordProps> {
get isHashed(): boolean;
hash(): Output<IError> | Output<void>;
compare(password: string): Output<IError> | Output<void>;
protected sanitizeProps(): void;
protected isValidProps(): boolean;
static init(props: IPasswordProps): Output<IError> | Output<PasswordValueObject>;
}