-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
lib.dom.d.ts incompatible with built-in Deno libs #8070
Comments
This is a regression, likely #7514 (cc/ @lucacasonato). We are not specifically testing for it but we should. I have broken it out as a new issues, since the original issue and solution are actually unrelated. Because they are classes now, instead of interfaces, they can't be merged/redeclared. There was something niggling me at the back of the mind about this, and it appears that this is the problem. |
For reference, you can get a list of incompatibilities by compiling anything with the following tsconfig: {
"compilerOptions": {
"lib": [
"dom",
"deno.web",
"deno.fetch",
"deno.window",
"deno.shared_globals",
"deno.ns",
"deno.unstable"
]
}
} I remember seeing a bunch of errors before #7514, enough that I didn't think it was a goal to have this. If it is, we can easily add an integration test. |
Although, I think we should just make It seems the quoted user can fix the issue by using the following tsconfig: {
"compilerOptions": {
"lib": [
"dom",
"deno.ns",
"deno.unstable"
]
}
} If not, we should instead focus on making this work. EDIT: I guess it would be a |
Yeah me too. I don't think we should explicitly be supporting this. |
I disagree... it is one of the main use cases for writing code that works on both the web and Deno. At a minimum we should support the following without error: {
"compilerOptions": {
"lib": [
"dom",
"deno.ns",
"deno.unstable"
]
}
} I may have mis-read the comment from the OP upon reflection... full compatibility is impossible with all the libs. It is just those 3 that need to not step on each other... |
That already works. I use it in dext. |
Ah, ok, then we need clarification from the OP then. It looks like |
Having the lib |
I tried and this worked. Thank you! |
- Don't use <reference lib="dom". Instead, use deno.json. See denoland/deno#8070 for details. - Upgrade to the latest std lib. - Fix some unqualified module imports.
- Don't use <reference lib="dom". Instead, use deno.json. See denoland/deno#8070 for details. - Upgrade to the latest std lib. - Fix some unqualified module imports.
- Don't use <reference lib="dom". Instead, use deno.json. See denoland/deno#8070 for details. - Upgrade to the latest std lib. - Fix some unqualified module imports.
Any updates?
I got a lot of ts errors when I used
@deno-types
to include type definitions for the ky libarry.From the error message, it is the
lib.dom.d.ts
which causes conflicts with other definitions.Originally posted by @cj1128 in #3726 (comment)
The text was updated successfully, but these errors were encountered: