rename map -> hydrateArray

This commit is contained in:
OxSaitama 2023-05-15 10:03:17 +02:00
parent 467b34a484
commit 6feeadbf69

View File

@ -9,7 +9,7 @@ export default class Resource {
return plainToClassFromExist(self, from, options); return plainToClassFromExist(self, from, options);
} }
public static map<T = {}>(ClassEntity: { new (): T }, fromArray: T[], options?: ClassTransformOptions): T[] { public static hydrateArray<T = {}>(ClassEntity: { new (): T }, fromArray: T[], options?: ClassTransformOptions): T[] {
return fromArray.map((from) => { return fromArray.map((from) => {
return plainToInstance(ClassEntity, from, options); return plainToInstance(ClassEntity, from, options);
}); });