We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeScript Version: 2.3.4
Code
This code
Array<number>(4).fill(0).map(...)
gave me the following error
Error:(22, 49) TS2339:Property 'fill' does not exist on type 'number[]'.
But if I switch to
Array<string>(4).fill('0').map(...)
Everything works well. Why is not working with number ? Is it a desire behavior ?
number
The text was updated successfully, but these errors were encountered:
Using
let arr:Array<Number>=new Array(8); arr.fill(0);
solved my issue
Sorry, something went wrong.
No branches or pull requests
TypeScript Version: 2.3.4
Code
This code
gave me the following error
But if I switch to
Everything works well. Why is not working with
number
? Is it a desire behavior ?The text was updated successfully, but these errors were encountered: