You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since keys of an object can be of type string|number|symbol and sometimes types require only string values, it will be handy to have a type that extracts only the string key (or of any type for that matter)
typeIndex=string|number|symbol;// I think we should make that type public!typeKeysOfType<Textendsobject,MextendsIndex>=Extract<keyofT,M>;typet=KeysOfType<{a: number;2: number;},string>;// "a"
@pirix-gh thoughts?
The text was updated successfully, but these errors were encountered:
regevbr
changed the title
extract keys of type (key type not its field type)
extract keys of type (key type, not its field type)
Aug 18, 2019
馃崺 Feature Request
Describe the solution you'd like
Since keys of an object can be of type
string|number|symbol
and sometimes types require only string values, it will be handy to have a type that extracts only the string key (or of any type for that matter)@pirix-gh thoughts?
The text was updated successfully, but these errors were encountered: