isKeyOfObject fix

This commit is contained in:
Aleksandr Kraiz
2022-11-28 18:26:34 +04:00
parent 1a33c41993
commit f6623f9bec
2 changed files with 2 additions and 2 deletions

View File

@@ -26,7 +26,7 @@ export function isUnknownObject(x: unknown): x is {
return x !== null && typeof x === 'object';
}
export function isKeyOfObject<K extends string | number | symbol, T extends Record<K, unknown>>(
export function isKeyOfObject<T extends object>(
key: string | number | symbol,
obj: T,
): key is keyof T {