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

Update to TypeScript 3.5.1 #2437

merged 1 commit into from Jun 1, 2019


3 participants
Copy link

commented Jun 1, 2019

There were some minor changes because type analysis was more precise than previous versions and globalThis needed to be removed from the runtime type library, because it is provided by TypeScript itself.

const method: (...args: any[]) => any = searchParams[methodName];
searchParams[methodName] = (...args: unknown[]): void => {
searchParams[methodName] = (...args: unknown[]): any => {

This comment has been minimized.

Copy link

zekth Jun 1, 2019


Why any as you don't return a value?

This comment has been minimized.

Copy link

kitsonk Jun 1, 2019

Author Contributor

There is an assignability issue in 3.5.1. Now TypeScript goes through each of the methodName values on searchParams and looks at the assignability, and some of those return things, so you can't assign a void to them. I don't know if the code is actually wrong or not, but now TypeScript is doing some real valid analysis. It is possible this method should really be returning something, but I just made a fix to get the code to pass under 3.5.1.


ry approved these changes Jun 1, 2019

Copy link

left a comment

Thanks! LGTM

@ry ry merged commit d438a6d into denoland:master Jun 1, 2019

3 checks passed

Travis CI - Pull Request Build Passed
continuous-integration/appveyor/pr AppVeyor build succeeded
license/cla Contributor License Agreement is signed.

@kitsonk kitsonk deleted the kitsonk:ts-35 branch Jun 4, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.