-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Changed default from ES3 to ES5 #15466
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
Conversation
@perlun, |
Argh, because of the delay the PR has gotten into merge conflicts. 😛 Will rebase and let you know once this is reviewable again. |
3a70332
to
9971d88
Compare
@RyanCavanaugh or @ahejlsberg - this one is rebased again on top of the current master, and seems to build cleanly. Would highly appreciate it we could get someone to look at it; because of the huge number of files affected (1450...), it is highly likely that it will run into merge conflicts over and over again if we leave it for a long time. Thanks in advance. |
Hi @perlun, sorry for the delay. I'm currently a little wary of which files were intended to be compiled on ES3 vs which files just happen to have minor output baselines changed. @mhegazy and @RyanCavanaugh may have some better guidance here. |
I think adding |
@saschanaz Sounds doable. I am not an expert in this codebase, so please give some more details and I'll see if I can get it sorted out. Where should this be added more specifically? |
@perlun It should be added as // @target: es3
class Cell {
}
class Ship {
isSunk: boolean;
}
class Board {
ships: Ship[];
cells: Cell[];
private allShipsSunk() {
return this.ships.every(function (val) { return val.isSunk; });
}
} I would use some automated script to do this. |
(Regarding the unrelated changes in `compileOnSave.ts`: I happened to see a few typing mistakes there very close to the changes I were making to that files, so I bundled that change along at the same time. Since the tests are passing I think it should be fine.)
9971d88
to
151963d
Compare
Thanks a lot @saschanaz, that sounds doable. I couldn't find Would the |
The file is here: https://github.com/Microsoft/TypeScript/blob/master/tests/cases/compiler/2dArrays.ts
Compiler tests does not use four slashes, you can just add one on the top of the file. Fourslash tests don't support |
Argh! I searched for it, but for whatever reason did a Thanks a lot! Will try to get this one sorted out within the next week or so. |
Had a discussion about this change in the design meeting today, you can find more details in #10117 (comment). as noted in #10117 (comment), we will not be taking this change in the time being. sorry for the delay, and the miss labeling of the issue as committed. |
Fixes #10117
The fix was easy, but then I had to get the tests passing:
...and then
git add .
to add all the changes. (There were a bunch of new files created when I did it like this; is that correct?)(Regarding the unrelated changes in
compileOnSave.ts
: I happened to see a few typing mistakes there very close to the changes I were making to that files, so I bundled that change along at the same time. Since the tests are passing I think it should be fine.)