Add missing constraints

This commit is contained in:
Ryan Cavanaugh 2022-08-11 13:06:55 -07:00 committed by Labhansh Agrawal
parent 6516af44d2
commit af4b21cd0e
2 changed files with 4 additions and 4 deletions

View file

@ -17,6 +17,6 @@ export function keys(imm: Record<string, any>) {
return keysCache.get(imm);
}
export const ObjectTypedKeys = <T>(obj: T) => {
export const ObjectTypedKeys = <T extends object>(obj: T) => {
return Object.keys(obj) as (keyof T)[];
};