microsoft/TypeScript

stricter definition of Object.keys; why not?

abetaev opened this issue ยท 2 comments

why instead

keys(o: object): string[];

not to have

keys<T = Record<string, unknown>>(o: T): (keyof T)[];

?
are there any issues with that?

jcalz commented

my bad, didn't look through closed ones.
thanks for the explanation.