Server: Update typescript.

This commit is contained in:
baldo 2022-08-30 15:03:09 +02:00
parent ac8159ce1d
commit 94e35b0bb4
3 changed files with 8 additions and 6 deletions

View file

@ -108,7 +108,7 @@
"prettier": "^2.7.1",
"time-grunt": "^2.0.0",
"ts-jest": "^28.0.8",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"yarn-audit-fix": "^9.3.5"
},
"resolutions": {

View file

@ -144,7 +144,9 @@ export function toIsArray<T>(isT: TypeGuard<T>): TypeGuard<T[]> {
return (arg): arg is T[] => isArray(arg, isT);
}
export function toIsEnum<E>(enumDef: E): EnumTypeGuard<E> {
export function toIsEnum<E extends Record<keyof E, ValueOf<E>>>(
enumDef: E
): EnumTypeGuard<E> {
return (arg): arg is ValueOf<E> =>
Object.values(enumDef).includes(arg as [keyof E]);
}

View file

@ -7343,10 +7343,10 @@ type-is@~1.6.18:
media-typer "0.3.0"
mime-types "~2.1.24"
typescript@^4.7.4:
version "4.7.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.7.4.tgz#1a88596d1cf47d59507a1bcdfb5b9dfe4d488235"
integrity sha512-C0WQT0gezHuw6AdY1M2jxUO83Rjf0HP7Sk1DtXj6j1EwkQNZrHAg2XPWlq62oqEhYvONq5pkC2Y9oPljWToLmQ==
typescript@^4.8.2:
version "4.8.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790"
integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==
typical@^4.0.0:
version "4.0.0"