.
This commit is contained in:
parent
ace4fa6599
commit
88663b07c8
@ -50,7 +50,7 @@ export class Percentage extends ValueObject<PercentageProps> {
|
|||||||
return schema.safeParse(values);
|
return schema.safeParse(values);
|
||||||
}
|
}
|
||||||
|
|
||||||
static create(props: { value: number; scale?: number }): Result<Percentage> {
|
static create(props: PercentageProps): Result<Percentage> {
|
||||||
const { value, scale = Percentage.DEFAULT_SCALE } = props;
|
const { value, scale = Percentage.DEFAULT_SCALE } = props;
|
||||||
|
|
||||||
const valueIsValid = Percentage.validate({ value, scale });
|
const valueIsValid = Percentage.validate({ value, scale });
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user