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
base: master
from

Conversation

Projects
None yet
4 participants
@IgorMinar
Member

IgorMinar commented Sep 27, 2018

No description provided.

@googlebot googlebot added the cla: yes label Sep 27, 2018

@mary-poppins

This comment has been minimized.

mary-poppins commented Sep 27, 2018

@mary-poppins

This comment has been minimized.

mary-poppins commented Sep 28, 2018

test: remove typescript 2.9 and 3.0 typings tests
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

This comment has been minimized.

Member

IgorMinar commented Sep 28, 2018

tap results look good - only preexisting failures

@mary-poppins

This comment has been minimized.

mary-poppins commented Sep 28, 2018

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

This comment has been minimized.

@IgorMinar

IgorMinar Sep 28, 2018

Member

@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.

This comment has been minimized.

@mhevery

mhevery Sep 28, 2018

Member

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

@IgorMinar IgorMinar requested a review from mhevery Sep 28, 2018

@IgorMinar IgorMinar changed the title from WIP feat: add support for TypeScript 3.1 to feat: add support for TypeScript 3.1 Sep 28, 2018

@mhevery

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";

This comment has been minimized.

@mhevery

mhevery Sep 28, 2018

Member

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

This comment has been minimized.

@IgorMinar

IgorMinar Sep 28, 2018

Member

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

This comment has been minimized.

@IgorMinar

IgorMinar Sep 28, 2018

Member

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;

This comment has been minimized.

@mhevery

mhevery Sep 28, 2018

Member

same in this file

@alxhub alxhub closed this in 9993c72 Sep 28, 2018

alxhub added a commit that referenced this pull request Sep 28, 2018

test: remove typescript 2.9 and 3.0 typings tests (#26151)
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

noelmace added a commit to noelmace/angular-cli that referenced this pull request Sep 30, 2018

feat(@schematics/angular): update Angular and TS versions
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment