Comment Comment by shortrounddev2 Doesn't work on types, only instantiated objects with values for those keys: class Foo { foo: number | undefined; bar: string | undefined; }; console.log(Object.keys(Foo)); // prints [] console.log(Object.keys(new Foo)); // prints [] parent shortrounddev2 3 years ago