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

Array map does not carry tuple size #49201

Closed
ilibar-zpt opened this issue May 21, 2022 · 2 comments
Closed

Array map does not carry tuple size #49201

ilibar-zpt opened this issue May 21, 2022 · 2 comments

Comments

@ilibar-zpt
Copy link

Bug Report

πŸ”Ž Search Terms

array map tuple size type

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about tuples

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

const a = [1,2] as [number, number]
const b = a.map(v => String(v))

πŸ™ Actual behavior

type of b is string[]

πŸ™‚ Expected behavior

type of b is [string, string]

@whzx5byb
Copy link

Duplicate of #29841

@ilibar-zpt
Copy link
Author

nice

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants