Skip to content

Commit

Permalink
fix(): make keys argument readonly (pick type and omit type)
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilmysliwiec committed May 14, 2020
1 parent d339a5e commit dd50600
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/type-helpers/omit-type.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const modelPropertiesAccessor = new ModelPropertiesAccessor();

export function OmitType<T, K extends keyof T>(
classRef: Type<T>,
keys: K[]
keys: readonly K[]
): Type<Omit<T, typeof keys[number]>> {
const fields = modelPropertiesAccessor
.getModelProperties(classRef.prototype)
Expand Down
2 changes: 1 addition & 1 deletion lib/type-helpers/pick-type.helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const modelPropertiesAccessor = new ModelPropertiesAccessor();

export function PickType<T, K extends keyof T>(
classRef: Type<T>,
keys: K[]
keys: readonly K[]
): Type<Pick<T, typeof keys[number]>> {
const fields = modelPropertiesAccessor
.getModelProperties(classRef.prototype)
Expand Down

0 comments on commit dd50600

Please sign in to comment.