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

URLPattern not available in lib.dom.d.ts #12558

Closed
lucacasonato opened this issue Oct 26, 2021 · 6 comments · Fixed by #14430
Closed

URLPattern not available in lib.dom.d.ts #12558

lucacasonato opened this issue Oct 26, 2021 · 6 comments · Fixed by #14430
Assignees
Labels
suggestion suggestions for new features (yet to be agreed) tsc related to the TypeScript tsc compiler

Comments

@lucacasonato
Copy link
Member

We should add it now, even if TSC has not quite caught up yet.

@lucacasonato lucacasonato added bug Something isn't working correctly tsc related to the TypeScript tsc compiler labels Oct 26, 2021
@kitsonk
Copy link
Contributor

kitsonk commented Oct 27, 2021

That is a very slippery slope. The manual edits we are doing to the es stuff is one thing and already a bit of a pain to deal with every time there is a change, but that is at least a language standard we can base off of. We really should support it getting into the official library here: https://github.com/microsoft/TypeScript-DOM-lib-generator and provide a standalone types file that people can use via <reference types="" /> or import type {} from "" versus hacking a distribution that then isn't portable to other runtimes. Especially because we only provide lib.dom.d.ts built in to make it more compatible with other distributions.

@kitsonk kitsonk added suggestion suggestions for new features (yet to be agreed) and removed bug Something isn't working correctly labels Oct 27, 2021
@lucacasonato
Copy link
Member Author

I think we should do this even though it may sound like a slippery slope. Using URLPattern with lib.dom.d.ts is currently really painful.

@bartlomieju
Copy link
Member

I agree with @lucacasonato

@kitsonk
Copy link
Contributor

kitsonk commented Mar 13, 2022

We should do a lib.dom.extras.d.ts then versus patching the file, like we do for lib.dom.asynciterable.d.ts. We could in theory warn about including it, like we do with unstable.

@sant123
Copy link

sant123 commented Apr 20, 2022

@kitsonk so in a future could exist this?

{
  "compilerOptions": {
    "lib": ["dom", "dom.asynciterable", "deno.ns", "dom.extra"],
    "jsxFactory": "h"
  }
}

@kitsonk
Copy link
Contributor

kitsonk commented Apr 24, 2022

Yes.

@kitsonk kitsonk self-assigned this Apr 29, 2022
kitsonk added a commit to kitsonk/deno that referenced this issue Apr 29, 2022
kitsonk added a commit that referenced this issue Apr 29, 2022
cjihrig pushed a commit that referenced this issue May 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
suggestion suggestions for new features (yet to be agreed) tsc related to the TypeScript tsc compiler
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants