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

chore: Upgrade to TypeScript 3.7 #5562

Merged
merged 2 commits into from Mar 31, 2020
Merged

Conversation

jackfranklin
Copy link
Collaborator

TypeScript seems to struggle to understand Promise.all when the items
in the array return different types. If we were authoring in TS we could
fix this with TS generics (Promise.all<OurTypeHere>(...)) but for now
we can typecast the result. We'll fix this properly when we author in
TS.

TypeScript seems to struggle to understand `Promise.all` when the items
in the array return different types. If we were authoring in TS we could
fix this with TS generics (`Promise.all<OurTypeHere>(...)`) but for now
we can typecast the result. We'll fix this properly when we author in
TS.
@jackfranklin
Copy link
Collaborator Author

jackfranklin commented Mar 31, 2020

Don't merge this yet - the typecheck works but the TS API must have changed slightly which is causing some doc errors:

DocLint Failures:
  1) [MarkDown] Method Accessibility.snapshot() options.root ElementHandle != ElementHandle<>
  2) [MarkDown] Method ExecutionContext.queryObjects() prototypeHandle JSHandle != JSHandle<>
  3) [MarkDown] Method Page.queryObjects() prototypeHandle JSHandle != JSHandle<>
  4) [MarkDown] Method Request.respond() response.body string|Buffer != string|Buffer<>

EDIT: this is fixed by a33e743

@mathiasbynens
Copy link
Member

We'll fix this properly when we author in TS.

Are we keeping track of these notes somewhere? If not, let's add a // TODO.

@jackfranklin
Copy link
Collaborator Author

Are we keeping track of these notes somewhere? If not, let's add a // TODO.

I think the /** @type is how we keep track of these; they are all effectively shortcuts in order to get us onto the right TS version. As we then convert files one by one we can't help but come back to them. So I don't think we need anything extra.

@mathiasbynens mathiasbynens merged commit 4b0fd8b into master Mar 31, 2020
@mathiasbynens mathiasbynens deleted the upgrade-typescript-3.7 branch March 31, 2020 16:42
@mathiasbynens mathiasbynens added this to the TypeScript migration milestone Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants