From dd5060055e40fa5b9ae3893662472c267ba65420 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Thu, 14 May 2020 11:51:31 +0200 Subject: [PATCH] fix(): make keys argument readonly (pick type and omit type) --- lib/type-helpers/omit-type.helper.ts | 2 +- lib/type-helpers/pick-type.helper.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/type-helpers/omit-type.helper.ts b/lib/type-helpers/omit-type.helper.ts index c82ad039b..c95a1a350 100644 --- a/lib/type-helpers/omit-type.helper.ts +++ b/lib/type-helpers/omit-type.helper.ts @@ -13,7 +13,7 @@ const modelPropertiesAccessor = new ModelPropertiesAccessor(); export function OmitType( classRef: Type, - keys: K[] + keys: readonly K[] ): Type> { const fields = modelPropertiesAccessor .getModelProperties(classRef.prototype) diff --git a/lib/type-helpers/pick-type.helper.ts b/lib/type-helpers/pick-type.helper.ts index 34145207e..7374cba21 100644 --- a/lib/type-helpers/pick-type.helper.ts +++ b/lib/type-helpers/pick-type.helper.ts @@ -13,7 +13,7 @@ const modelPropertiesAccessor = new ModelPropertiesAccessor(); export function PickType( classRef: Type, - keys: K[] + keys: readonly K[] ): Type> { const fields = modelPropertiesAccessor .getModelProperties(classRef.prototype)