build: TypeScript 3.6 compatibility.#32908
Conversation
|
@kara the area really is LMK if this works for you with the |
There was a problem hiding this comment.
Why remove the const?
There was a problem hiding this comment.
Const enums are guaranteed to be fully removed and inlined to their members. But we re-export the enum, which means the object would need to be retained. Here's the error:
error TS2475: 'const' enums can only be used in property or index access expressions or the right hand side of an import declaration or export assignment or type query.
There was a problem hiding this comment.
I wonder if this is used at all. I couldn't find any reference to DirectiveDefFlags (other than declaring it and exporting it) and it doesn't seem to be part of the public API either.
EDIT: It seems to be an artifact from #20855.
gkalpak
left a comment
There was a problem hiding this comment.
LGTM (except for the commit messages, which need to follow the guidelines to make the linter happy) ❤️
cddc8f4 to
8137c55
Compare
|
@gkalpak do you mean the commit msg from the subsequent fixups, or the original one? I hope the original one is OK, let me know if it's not. I've rebased onto master and squashed. |
|
I meant the subsequent commits (which are gone now). But now that you mentioned it, the original commit should probably not mention Also, the formatter complains about misformatted files now. (You can see the error here.) BTW, it is outside the scope of this PR, but mentioning it "for completeness": |
8137c55 to
76a4113
Compare
|
@gkalpak done. |
IgorMinar
left a comment
There was a problem hiding this comment.
lgtm, I created a follow up PR that properly upgrades to tsc 3.6 and cleans up some of Martin's changes: #32946 this PR is blocked on typscript 3.6.4 release, so I think we should go ahead and merge this one in to unblock tsc update in google3, while we wait on the typescript release.
This PR updates Angular to compile with TypeScript 3.6 while retaining compatibility with TS3.5. We achieve this by inserting several `as any` casts for compatiblity around `ts.CompilerHost` APIs.
|
@IgorMinar I've rebased this onto latest master. |
|
merge-assistance: global approval I also kicked off a presubmit: http://test/OCL:272419562:BASE:272419580:1570020811421:232c8db4 |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
This PR updates Angular to compile with TypeScript 3.6 while retaining
compatibility with TS3.5. We achieve this by inserting several
as anycasts for compatiblity around
ts.CompilerHostAPIs.