Skip to content

build: update to typescript 3.2 #15587

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

Merged
merged 1 commit into from
Mar 28, 2019
Merged

Conversation

crisbeto
Copy link
Member

Updates to TypeScript 3.2 and fixes some compilation errors.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Mar 23, 2019
@crisbeto crisbeto marked this pull request as ready for review March 23, 2019 12:21
@crisbeto crisbeto added the target: major This PR is targeted for the next major release label Mar 23, 2019
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Mar 25, 2019
Copy link
Member

@devversion devversion left a comment

Choose a reason for hiding this comment

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

LGTM, other than the small question.

@@ -36,4 +36,4 @@ try {
}
}

export {ts};
export {ts, typescript};
Copy link
Member

Choose a reason for hiding this comment

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

Why do we need to export the typescript thing here? Shouldn't everything just use the agnostic TypeScript version which is also typed?

Copy link
Member Author

Choose a reason for hiding this comment

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

My understanding is that the ts and the typescript refer to two different namespaces. ts didn't have SourceFile which we needed.

Copy link
Member

@devversion devversion Mar 25, 2019

Choose a reason for hiding this comment

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

The ts object should be typed with typeof typescript but I could see that this one omits the actual types as it's not declared as namespace. Though it feels ambiguous to export ts and typescript.

Why can't we just rely on the implicit type from ts.createSourceFile? I don't bother too much, but there is definitely some ambiguity now. If you want to explicitly type it, how about just importing typescript there and type it from there? We just need to use the agnostic TS version at runtime

Copy link
Member Author

Choose a reason for hiding this comment

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

We can't let it infer the type from createSourceFile, because Bazel was throwing an error about a dependency being brought in implicitly.

Copy link
Member

@devversion devversion Mar 25, 2019

Choose a reason for hiding this comment

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

hmm. There should be no change of transitive dependencies with the current changes. I'm okay getting it in like that. I can just explore cleaning up the ambiguous export in a follow-up then.

@jelbourn
Copy link
Member

@crisbeto could you rebase?

@crisbeto
Copy link
Member Author

Rebased.

Updates to TypeScript 3.2 and fixes some compilation errors.
@jelbourn
Copy link
Member

This was merge-safe all along (we don't sync schematics)

@jelbourn jelbourn merged commit 297760f into angular:master Mar 28, 2019
@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 10, 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 PR author has agreed to Google's Contributor License Agreement target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants