Reputation: 845
I remember previously using a built in type that is the union of all possible object keys, and it was name objectKey
or something similar.
For example:
type objectKey = string | number | symbol
However, I can’t remember the specific name now. Does anyone know what it is named?
Upvotes: 0
Views: 94
Reputation: 23825
It is called PropertyKey
.
declare type PropertyKey = string | number | symbol;
Upvotes: 3