Skip to content

Commit

Permalink
chore: upgrade Typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
carlbrugger committed Nov 15, 2024
1 parent 4e27de6 commit 221b622
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,6 @@
"ts-jest": "^29.1.1",
"@types/node": "17.0.33",
"prettier": "2.7.1",
"typescript": "4.6.4"
"typescript": "5.6.3"
}
}
2 changes: 1 addition & 1 deletion src/core/schemas/utils/entries.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function entries<T>(object: T): [keyof T, T[keyof T]][] {
return Object.entries(object) as [keyof T, T[keyof T]][];
return Object.entries(object as Record<keyof T, T[keyof T]>) as [keyof T, T[keyof T]][];
}
4 changes: 2 additions & 2 deletions src/core/schemas/utils/filterObject.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
export function filterObject<T, K extends keyof T>(obj: T, keysToInclude: K[]): Pick<T, K> {
const keysToIncludeSet = new Set(keysToInclude);
return Object.entries(obj).reduce((acc, [key, value]) => {
return Object.entries(obj as Record<keyof T, T[keyof T]>).reduce((acc, [key, value]) => {
if (keysToIncludeSet.has(key as K)) {
acc[key as K] = value;
acc[key as K] = value as T[K];
}
return acc;
// eslint-disable-next-line @typescript-eslint/prefer-reduce-type-parameter
Expand Down
2 changes: 1 addition & 1 deletion src/core/schemas/utils/keys.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export function keys<T>(object: T): (keyof T)[] {
return Object.keys(object) as (keyof T)[];
return Object.keys(object as Record<keyof T, T[keyof T]>) as (keyof T)[];
}
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2260,10 +2260,10 @@ type-fest@^0.21.3:
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.21.3.tgz#d260a24b0198436e133fa26a524a6d65fa3b2e37"
integrity sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==

typescript@4.6.4:
version "4.6.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.6.4.tgz#caa78bbc3a59e6a5c510d35703f6a09877ce45e9"
integrity sha512-9ia/jWHIEbo49HfjrLGfKbZSuWo9iTMwXO+Ca3pRsSpbsMbc7/IU8NKdCZVRRBafVPGnoJeFL76ZOAA84I9fEg==
typescript@5.6.3:
version "5.6.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b"
integrity sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==

undici-types@~6.19.8:
version "6.19.8"
Expand Down

0 comments on commit 221b622

Please sign in to comment.