Skip to content
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

feat: add support for TypeScript 3.1 #26151

Closed
wants to merge 4 commits into from

Conversation

IgorMinar
Copy link
Contributor

No description provided.

@mary-poppins
Copy link

You can preview 4f566d8 at https://pr26151-4f566d8.ngbuilds.io/.

@mary-poppins
Copy link

You can preview 6bd9e22 at https://pr26151-6bd9e22.ngbuilds.io/.

We no longer support these versions and the tests actually break with
the output from 3.1 (at least in the case of tsc 2.9)
@IgorMinar
Copy link
Contributor Author

tap results look good - only preexisting failures

@mary-poppins
Copy link

You can preview 51ead0e at https://pr26151-51ead0e.ngbuilds.io/.

this.patchedDeps && ngBackPatch_node_modules_libB_module() && (this.patchedDeps = true);
return details_elided;}
patchedDeps: false, create(parentInjector: Injector | null): NgModuleRef<AppModule>{
if (!this.patchedDeps) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mhevery is this the right change?

The original code is wrong and doesn't compile, when you read it you realize that it results in unreachable code because ngBackPatch_node_modules_libB_module() doesn't explicitly return anything (so it returns void).

The spec suggests that this is our generated code. Does that mean that the compiler actually emits bad code?

Please advise on how to proceed with this change.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This whole file is outdated and should be deleted. These tests don't even have a runner.

@IgorMinar IgorMinar added target: major This PR is targeted for the next major release action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 28, 2018
@IgorMinar IgorMinar changed the title WIP feat: add support for TypeScript 3.1 feat: add support for TypeScript 3.1 Sep 28, 2018
Copy link
Contributor

@mhevery mhevery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The .d.ts files look strange to me because they have value rather than a type. LGTM otherwise.

@@ -1497,8 +1497,8 @@ export interface HttpDownloadProgressEvent extends HttpProgressEvent {
export declare class HttpErrorResponse extends HttpResponseBase implements Error {
readonly error: any | null;
readonly message: string;
readonly name: string;
readonly ok: boolean;
readonly name = "HttpErrorResponse";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems wrong. Why does the .d.ts file have the actual value rather than the type. Can you look into it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe that ts 3.1 now stores literal values used in prop initializers directly in d.ts. Previously only the inferred type would be present in d.ts

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah. confirmed.

@@ -624,7 +624,7 @@ export declare abstract class Query {

export declare class QueryList<T> {
readonly changes: Observable<any>;
readonly dirty: boolean;
readonly dirty = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same in this file

@IgorMinar IgorMinar added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Sep 28, 2018
@alxhub alxhub closed this in 9993c72 Sep 28, 2018
alxhub pushed a commit that referenced this pull request Sep 28, 2018
We no longer support these versions and the tests actually break with
the output from 3.1 (at least in the case of tsc 2.9)

PR Close #26151
nweldev pushed a commit to nweldev/angular-cli that referenced this pull request Sep 30, 2018
The CLI legacy e2e tests where failing because Angular 7.0.0-rc.0 embed
angular/angular#26151, and TS version 3.0 wasn't
right for this. This commit fix this error as reported in angular#12423, but isn't enought
to support TS 3.1.

Close angular#12413
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this pull request Jan 3, 2019
FrederikSchlemmer pushed a commit to FrederikSchlemmer/angular that referenced this pull request Jan 3, 2019
We no longer support these versions and the tests actually break with
the output from 3.1 (at least in the case of tsc 2.9)

PR Close angular#26151
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 14, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants