diff --git a/dist/Resource.d.ts b/dist/Resource.d.ts index fef5538..b8a96d0 100644 --- a/dist/Resource.d.ts +++ b/dist/Resource.d.ts @@ -3,7 +3,7 @@ import { type ClassTransformOptions } from "class-transformer"; import { ValidatorOptions } from "class-validator"; export default class Resource { static hydrate(from: Partial, options?: ClassTransformOptions): T; - static map(ClassEntity: { + static hydrateArray(ClassEntity: { new (): T; }, fromArray: T[], options?: ClassTransformOptions): T[]; static validateOrReject(validatorOptions?: ValidatorOptions): Promise; diff --git a/dist/Resource.js b/dist/Resource.js index 23cada1..f95451f 100644 --- a/dist/Resource.js +++ b/dist/Resource.js @@ -11,7 +11,7 @@ class Resource { const self = new this; return (0, class_transformer_1.plainToClassFromExist)(self, from, options); } - static map(ClassEntity, fromArray, options) { + static hydrateArray(ClassEntity, fromArray, options) { return fromArray.map((from) => { return (0, class_transformer_1.plainToInstance)(ClassEntity, from, options); });