-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Duplicate identifier error caused by lib.dom.d.ts #35578
Comments
You need to set the |
@RyanCavanaugh what should I put to Here are some combinations that I've tried, but without any success:
So I didn't find any way to exclude it. Seems lib option works only if you want to add something, but not exclude. |
If your tsconfig has a |
@fatcerberus No, there are no references to dom. The only reference is to Moreover I've tested that with only one declaration file so there should be no hidden side-effects from modules or something. |
This issue has been marked as 'Question' and has seen no recent activity. It has been automatically closed for house-keeping purposes. If you're still waiting on a response, questions are usually better suited to stackoverflow. |
It's not a question. It's a bug. @RyanCavanaugh |
I'm coming across this same issue and am totally stumped - I've literally grep-ed the relevant |
@viggyfresh It's a typescript bug, so there's only one option - to define something |
Right after I posted this, had a breakthrough - the /// <reference syntax uses “dom” as the lib text, not lib.dom.d.ts. For posterity, if you are mysteriously including lib.dom.d.ts, search your node modules for a package that contains that reference...you might be surprised. |
@viggyfresh, yes, that's true. But according to typescript docs it shouldn't use 'dom' library unless there are something except it is set in Probably you should post another issue describing what you've found. Maybe then it will get more attention. |
Anything new on this? Facing the exact same issue. |
@hansgfixed there's just a workaround, and you need to create your own class for URL with name like |
Any news on how to fix this? |
@viggyfresh Thanks for pointing that out -- has helped to narrow down the problem.
I've posted a follow up issue here |
|
TypeScript Version: 3.7.3 & 3.8.0-dev.20191207
Search Terms:
Duplicate identifier, lib.dom.d.ts
Code
Actually I've tried various tsconfig options, including target es6, with
but nothing helped.
Expected behavior:
No error during compilation should be thrown. Or at list it should respect
tsconfig
exclude
section and not use thatlib.dom.d.ts
if it's excluded.Actual behavior:
Related Issues: #20595 #5585 #4168 DefinitelyTyped/DefinitelyTyped#34960
The text was updated successfully, but these errors were encountered: