Update Angular to support TS 3.9#36989
Conversation
This comment has been minimized.
This comment has been minimized.
The Framework team is in the process of updating to TS 3.9 (see angular/angular#36989) which means that soon we'll have to switch to it as well. These changes update us to the latest RC and resolve all of the build issues so that we can quickly switch to the final version once it's available.
The Framework team is in the process of updating to TS 3.9 (see angular/angular#36989) which means that soon we'll have to switch to it as well. These changes update us to the latest RC and resolve all of the build issues so that we can quickly switch to the final version once it's available.
The Angular team is in the process of updating to TS 3.9 (see angular/angular#36989) which means that soon we'll have to switch to it as well. These changes update us to the latest RC and resolve all of the build issues so that we can quickly switch to the final version once it's available.
The Angular team is in the process of updating to TS 3.9 (see angular/angular#36989) which means that soon we'll have to switch to it as well. These changes update us to the latest RC and resolve all of the build issues so that we can quickly switch to the final version once it's available.
7322661 to
822bd51
Compare
845573e to
904c60f
Compare
This comment has been minimized.
This comment has been minimized.
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
With this changer we update the CLI size-tracking changes for uncompressed main-es2015 file. This file is larger due to new emitted shape of ES2015 classes in TypeScript 3.9, which are now wrapped in IIFE.
This is a workaround for a TS 3.9 regression microsoft/TypeScript#38501 where the emitted `__exportStar` helpers have a missing semi-colon at the end of the unnamed function, when targetting UMD, and causes the following runtime error `Uncaught TypeError: (intermediate value)(…) is not a function`. This is because the anonymous `__exportStar` function will be invoked with the function on the next like as the parameter which is subsequently invoking whatever was returned. To get around this TS bug, add `importHelpers: true` in your tsconfig. This also, is recommanded to avoid multiple copies of the same helper being inlined, which might cause increase in bundle size.
`cli-hello-world-lazy-rollup` fails on a bundle size check because Ivy and VE main-es2015 sizes are different
TypeScript 3.9 introduced a breaking change where extends `any` no longer acts as `any`, instead it acts as `unknown`. With this change we retain the behavior we had with TS 3.8 which is; When using the `EventEmitter` as a type you must always provide a type; ```ts let emitter: EventEmitter<string> ``` and when initializing the `EventEmitter` class you can either provide a type or or use the fallback type which is `any` ```ts const emitter = new EventEmitter(); // EventEmitter<any> const emitter = new EventEmitte<string>(); // EventEmitter<string> ``
With this change we update the expect of the `module resolution cache` were in the second count with cache the `fileExists` is called less then 700 times.
In the code base there are cases where there is, conceptually, a class
that is represented by a combination of an `interface`
(type declaration) and a `const` (value declaration).
For example:
```
export interface SomeClass {
count(a?: string): number;
}
export const: SomeClass = class {
someMethod(a: string = ''): number { ... }
};
```
These were being rendered as interfaces and also not
correctly showing the descriptions and default parameter
values.
In this commit such concepts are now rendered as classes.
The classes that are affected by this are:
* `DebugElement`
* `DebugNode`
* `Type`
* `EventEmitter`
* `TestBed`
Note that while decorators are also defined in this form
they have their own rendering type (`decorator`) and so
are not affecte by this.
|
@petebacondarwin your suggestion worked and the code is now fully compatible with closure! yay! awesome job! I resolved the merge conflict that occured due to recent merges upstream, updated the payload sizes for aio-local, rebased the branch, force-pushed, and kicked of a g3sync presubmit. Hopefully this will make the PR go green 🤞 |
|
You can preview d53f40e at https://pr36989-d53f40e.ngbuilds.io/. |
|
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
|
A Googler has manually verified that the CLAs look good. (Googler, please make sure the reason for overriding the CLA status is clearly documented in these comments.) ℹ️ Googlers: Go here for more info. |
|
You can preview 11cf068 at https://pr36989-11cf068.ngbuilds.io/. |
|
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
- Fix several compilation errors - Update @microsoft/api-extractor to be compatible with TypeScript 3.9 PR Close #36989
…ression()` (#36989) The previous implementations of `hasBaseClass()` are almost identical to the implementation of `getBaseClassExpression()`. There is little benefit in duplicating this code so this refactoring changes `hasBaseClass()` to just call `getBaseClassExpression()`. This allows the various hosts that implement this to be simplified. PR Close #36989
|
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 is a big PR with lots of commits. But most are in the compiler or are just tweaks to tests. So hopefully it will not be too arduous to review. It will be easier to go commit by commit when reviewing.