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

URL is not standard #496

Closed

Conversation

Bohdan-Anderson-Rangle
Copy link

URL is not common everywhere - adding this resolves a bug in some setups
DefinitelyTyped/DefinitelyTyped#19799

URL is not common everywhere - adding this resolves a bug in some setups
DefinitelyTyped/DefinitelyTyped#19799
@ehmicky
Copy link
Collaborator

ehmicky commented Mar 2, 2022

Hi @Bohdan-Anderson-Rangle,

URL became a global object with Node.js 10.0.0. Also, it is standard, see the WHATWG specification here and the W3C one here. That being said, it is possible that it is not implemented everywhere (which is different from not being standard).

tsc finds the type of URL as a global object if you use either:

  • @types/node, providing the version is recent enough.
  • The --lib dom flag (which is enabled by default).

Is the setup that you're using missing one of those?

@sindresorhus
Copy link
Owner

This was an issue before, but it should be fixed now. See: sindresorhus/globby#230

@Bohdan-Anderson-Rangle
Copy link
Author

100% it was an issue with my tsconfig thank you for calling that out.

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

3 participants