@revolugo/common 7.1.0-alpha.2 → 7.1.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@revolugo/common",
3
- "version": "7.1.0-alpha.2",
3
+ "version": "7.1.0-alpha.3",
4
4
  "private": false,
5
5
  "description": "Revolugo common",
6
6
  "author": "Revolugo",
@@ -127,6 +127,7 @@ export interface HotelRoomOfferRequestResponse {
127
127
  sourceMarket: SourceMarket
128
128
  }
129
129
 
130
+ // eslint-disable-next-line no-restricted-syntax
130
131
  export type HotelRoomOfferRequestCreate = Pick<
131
132
  HotelRoomOfferRequest,
132
133
  | 'adultCount'
package/src/utils/omit.ts CHANGED
@@ -6,6 +6,7 @@
6
6
  export function omit<T extends object, K extends keyof T>(
7
7
  object: T | null | undefined,
8
8
  keys: readonly K[] | K,
9
+ // eslint-disable-next-line no-restricted-syntax
9
10
  ): Omit<T, K> {
10
11
  if (object === null || object === undefined) {
11
12
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -35,5 +36,6 @@ export function omit<T extends object, K extends keyof T>(
35
36
  }
36
37
  }
37
38
 
39
+ // eslint-disable-next-line no-restricted-syntax
38
40
  return result as Omit<T, K>
39
41
  }
package/src/utils/pick.ts CHANGED
@@ -1,7 +1,9 @@
1
1
  export function pick<T extends object, K extends keyof T>(
2
2
  obj: T,
3
3
  keys: readonly K[],
4
+ // eslint-disable-next-line no-restricted-syntax
4
5
  ): Pick<T, K> {
6
+ // eslint-disable-next-line no-restricted-syntax
5
7
  const result = {} as Pick<T, K>
6
8
  for (const key of keys) {
7
9
  if (Object.hasOwn(obj, key)) {
@@ -7,6 +7,7 @@ export function shake<RemovedKeys extends string, T>(
7
7
  obj: T,
8
8
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
9
9
  filter: (value: any) => boolean = x => x === undefined,
10
+ // eslint-disable-next-line no-restricted-syntax
10
11
  ): Omit<T, RemovedKeys> {
11
12
  if (!obj) {
12
13
  return {} as T