You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The typescript compiler doesn't seem to handle for loops right now.
It seems like one way to handle it would be to:
Make a new loop name
Set up the iterator variable assignment once
Set up the iterator variable increment in the body of the loop
Set up the end condition computation, and jump back after
One issue I guess with adding for loops is that it's not super obvious which loops users should expect to work or not, and so it might create a lot of implied work (to handle other loops), but maybe a decent way of handling it would just be to see if the user seems to be using some type of loop, and have the error message explain which type of loop they can do.
The text was updated successfully, but these errors were encountered:
Yeah! Maybe just supporting plain old "classic" for loops would be a good start. You know, the kind with for (var i = 0; i < lst.length; ++i). That seems pretty easy to compile tbh, unlike modern "foreach" loops.
The typescript compiler doesn't seem to handle for loops right now.
It seems like one way to handle it would be to:
One issue I guess with adding for loops is that it's not super obvious which loops users should expect to work or not, and so it might create a lot of implied work (to handle other loops), but maybe a decent way of handling it would just be to see if the user seems to be using some type of loop, and have the error message explain which type of loop they can do.
The text was updated successfully, but these errors were encountered: