Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

keyof for Map #225

Open
fregante opened this issue Jul 1, 2021 · 3 comments
Open

keyof for Map #225

fregante opened this issue Jul 1, 2021 · 3 comments
Labels
help wanted Extra attention is needed type addition

Comments

@fregante
Copy link
Collaborator

fregante commented Jul 1, 2021

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.
Fund with Polar
@sindresorhus
Copy link
Owner

👍

@sindresorhus sindresorhus added help wanted Extra attention is needed type addition labels Jul 1, 2021
@fregante
Copy link
Collaborator Author

fregante commented Jul 20, 2021

@fregante
Copy link
Collaborator Author

I think this exists as MapKey, but is not exported.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed type addition
Projects
None yet
Development

No branches or pull requests

2 participants