-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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
Pushing an item into a sub-array gives error #58984
Comments
This isn't really a place to ask about using TypeScript. You should consider closing this issue and asking your question on Stack Overflow or the TypeScript Discord. Additionally, screenshots aren't a good way to communicate issues you're having with code. You should provide a self-contained plaintext example. But again, not here. Good luck! |
Typescript's entire point is to give errors on code that are valid Javascript. |
@jcalz Very interesting answer. I thought we could address it here when there is a github repo on the source code of typescript and the repo also allows for issues. Perhaps i have been mislead as usual. Never mind. @MichalMarsalek thank you for being helpful. Unfortunately there is no error in the code. I checked out the DISCORD and the STACK Overflow and they all state the code is correct, including Typescript documentation. Only that realized that validator codes themselves can have errors and so could Microsoft. |
The issues are for tracking bugs and feature requests for Typescript. Not general questions about how Typescript works.
The My comment was a response to
Which sounds quite strange because it sounded like you were complaining that ts is giving you an error for something that is valid js - but that's Typescript's job. |
@MichalMarsalek thank you for the update. I have cleared the error. Github Co-pilot resolved it for me and also taught me how vanilla javascript is better and is more reliable. What is my basis? Simple, the code that showed as error in TS worked fine with the JS code generated. That is really odd. Anyway the subject is closed and Github Co-pilot is the way to go. Thank you for all the help. |
Acknowledgement
Comment
I am not why i am getting an error when i try to push a new element into sub-array within the main array when it works fine in Javascript. See screencap below:
The text was updated successfully, but these errors were encountered: