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

Work around TypeScript type problem with URL global #206

Merged
merged 2 commits into from Jan 17, 2022

Conversation

antongolub
Copy link
Contributor

@antongolub antongolub mentioned this pull request Jan 16, 2022
@sindresorhus
Copy link
Owner

This should not be needed. URL is a valid global in Node.js.

@antongolub
Copy link
Contributor Author

antongolub commented Jan 16, 2022

Correct, should not be needed. However built-in TS libdefs (4.5.4) do not reflect this fact.

image

And @types/node too.
image

@antongolub
Copy link
Contributor Author

antongolub commented Jan 16, 2022

I'll push a PR to TS/DefinetlyTyped, but right now I'd like to fix our CI/CD.

@antongolub
Copy link
Contributor Author

antongolub commented Jan 16, 2022

Clarified for myself what's going on: it seems that if we have no explicit lib declaration in compilerOptions, TS attaches dom, es5, etc as default.

image

@sindresorhus
Copy link
Owner

I forgot, this is actually a long running TS issue: DefinitelyTyped/DefinitelyTyped#34960 (I cannot believe they have still not fixed that...)

@sindresorhus sindresorhus changed the title fix: add missed ref for URL Work around TypeScript type problem with URL global Jan 17, 2022
@sindresorhus sindresorhus merged commit 1224230 into sindresorhus:main Jan 17, 2022
@sindresorhus
Copy link
Owner

https://github.com/sindresorhus/globby/releases/tag/v12.2.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants