refactor: eliminar tipos genéricos innecesarios en IAggregateRootRepository y métodos de clase

This commit is contained in:
David Arranz 2026-09-07 13:39:30 +02:00
parent a4398e163f
commit 1065311deb
6 changed files with 10 additions and 8 deletions

View File

@ -1,2 +1 @@
// biome-ignore lint/complexity/noBannedTypes: <explanation>
export type IAggregateRootRepository<T> = {};
export type IAggregateRootRepository = {};

View File

@ -4,9 +4,9 @@ import type { IDomainEvent } from "./events";
export abstract class AggregateRoot<T extends object> extends DomainEntity<T> {
private _domainEvents: IDomainEvent[] = [];
private logDomainEventAdded(event: IDomainEvent): void {
const thisClass = Reflect.getPrototypeOf(this);
const domainEventClass = Reflect.getPrototypeOf(event);
private logDomainEventAdded(_event: IDomainEvent): void {
//const thisClass = Reflect.getPrototypeOf(this);
//const domainEventClass = Reflect.getPrototypeOf(event);
}
/**

View File

@ -129,7 +129,7 @@ export class Percentage extends ValueObject<PercentageProps> {
}
format(locale: string): string {
const scale = this.scale;
//const scale = this.scale;
return this.toNumber().toLocaleString(locale, {
style: "percent",

View File

@ -26,7 +26,7 @@ export class TaxCode extends ValueObject<TaxCodeProps> {
return schema.safeParse(value);
}
static create(value: string) {
static create(_value: string) {
throw new Error("DEPRECATED -> ¿DEBERÍA USARSE STRING COMO EN LAS FACTURAS?");
/*const valueIsValid = TaxCode.validate(value);

View File

@ -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 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);
}

View File

@ -23,6 +23,9 @@
"@erp/catalogs/*": [
"modules/catalogs/src/*"
],
"@erp/onboarding/*": [
"modules/onboarding/src/*"
],
"@erp/supliers/*": [
"modules/supliers/src/*"
],