-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this 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}; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
@crisbeto could you rebase? |
Rebased. |
2aa2a12
to
7c10dc7
Compare
Updates to TypeScript 3.2 and fixes some compilation errors.
7c10dc7
to
2d9a0c2
Compare
This was merge-safe all along (we don't sync schematics) |
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. |
Updates to TypeScript 3.2 and fixes some compilation errors.