refactor: eliminar tipos genéricos innecesarios en IAggregateRootRepository y métodos de clase
This commit is contained in:
parent
a4398e163f
commit
1065311deb
@ -1,2 +1 @@
|
|||||||
// biome-ignore lint/complexity/noBannedTypes: <explanation>
|
export type IAggregateRootRepository = {};
|
||||||
export type IAggregateRootRepository<T> = {};
|
|
||||||
|
|||||||
@ -4,9 +4,9 @@ import type { IDomainEvent } from "./events";
|
|||||||
export abstract class AggregateRoot<T extends object> extends DomainEntity<T> {
|
export abstract class AggregateRoot<T extends object> extends DomainEntity<T> {
|
||||||
private _domainEvents: IDomainEvent[] = [];
|
private _domainEvents: IDomainEvent[] = [];
|
||||||
|
|
||||||
private logDomainEventAdded(event: IDomainEvent): void {
|
private logDomainEventAdded(_event: IDomainEvent): void {
|
||||||
const thisClass = Reflect.getPrototypeOf(this);
|
//const thisClass = Reflect.getPrototypeOf(this);
|
||||||
const domainEventClass = Reflect.getPrototypeOf(event);
|
//const domainEventClass = Reflect.getPrototypeOf(event);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -129,7 +129,7 @@ export class Percentage extends ValueObject<PercentageProps> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
format(locale: string): string {
|
format(locale: string): string {
|
||||||
const scale = this.scale;
|
//const scale = this.scale;
|
||||||
|
|
||||||
return this.toNumber().toLocaleString(locale, {
|
return this.toNumber().toLocaleString(locale, {
|
||||||
style: "percent",
|
style: "percent",
|
||||||
|
|||||||
@ -26,7 +26,7 @@ export class TaxCode extends ValueObject<TaxCodeProps> {
|
|||||||
return schema.safeParse(value);
|
return schema.safeParse(value);
|
||||||
}
|
}
|
||||||
|
|
||||||
static create(value: string) {
|
static create(_value: string) {
|
||||||
throw new Error("DEPRECATED -> ¿DEBERÍA USARSE STRING COMO EN LAS FACTURAS?");
|
throw new Error("DEPRECATED -> ¿DEBERÍA USARSE STRING COMO EN LAS FACTURAS?");
|
||||||
/*const valueIsValid = TaxCode.validate(value);
|
/*const valueIsValid = TaxCode.validate(value);
|
||||||
|
|
||||||
|
|||||||
@ -99,7 +99,7 @@ export class Collection<T> {
|
|||||||
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
|
* @param callbackfn A function that accepts up to three arguments. forEach calls the callbackfn function one time for each element in the array.
|
||||||
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
* @param thisArg An object to which the this keyword can refer in the callbackfn function. If thisArg is omitted, undefined is used as the this value.
|
||||||
*/
|
*/
|
||||||
forEach<U>(callbackfn: (value: T, index: number, array: T[]) => void, _thisArg?: unknown): void {
|
forEach(callbackfn: (value: T, index: number, array: T[]) => void, _thisArg?: unknown): void {
|
||||||
this.items.forEach(callbackfn);
|
this.items.forEach(callbackfn);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -23,6 +23,9 @@
|
|||||||
"@erp/catalogs/*": [
|
"@erp/catalogs/*": [
|
||||||
"modules/catalogs/src/*"
|
"modules/catalogs/src/*"
|
||||||
],
|
],
|
||||||
|
"@erp/onboarding/*": [
|
||||||
|
"modules/onboarding/src/*"
|
||||||
|
],
|
||||||
"@erp/supliers/*": [
|
"@erp/supliers/*": [
|
||||||
"modules/supliers/src/*"
|
"modules/supliers/src/*"
|
||||||
],
|
],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user