Duration
5 min
Access
Pro
Transcript
Needs source

The keyof operator produces a union type of all known, public property names of a given type. You can use it together with lookup types (aka indexed access types) to statically model dynamic property access in the type system.