type-fest
type-fest copied to clipboard
`keyof` for Map
Context: https://stackoverflow.com/q/60737502
const obj = {first: 'First Name', last: 'Last Name'};
type Keys = keyof typeof obj; // first | last
const map = new Map([
[first, 'First Name'],
[last: 'Last Name']
]);
type Keys = ????????
Upvote & Fund
- We're using Polar.sh so you can upvote and help fund this issue.
- The funding will be given to active contributors.
- Thank you in advance for helping prioritize & fund our backlog.
👍
- Related/similar: https://github.com/sindresorhus/type-fest/issues/115