You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hardcode some sort of dom -> @types/web inside the TS compiler's
Support some kind of pragma in @types/web
1 - Hardcoding
Pros: @types/webis a special case (though there could be more in the future) and this could be the smallest possible change.
Cons:
It feels a bit meh.
2 - Pragmas
Pros:
We have existing pragmas: /// <reference no-default-lib="true"/> for type of thing. This answer is totally generic and would allow others to have their own implementations of other deployed libs.
Cons:
I'd need to check, but this might mean looking for the pragmas across all @types dts files before we can reliably use the files inlib
Suggestion
I'd like to be able to install
@types/weband have the following happen:/// <reference lib="dom">do not resolve to the vendoredlibdom.d.tsdomin a project vialibwould automatically pick up@types/web(or be fully suppressed)🔍 Search Terms
dom types/web web lib
✅ Viability Checklist
My suggestion meets these guidelines:
⭐ Suggestion
dom->@types/webinside the TS compiler's@types/web1 - Hardcoding
Pros:
@types/webis a special case (though there could be more in the future) and this could be the smallest possible change.Cons:
It feels a bit meh.
2 - Pragmas
Pros:
We have existing pragmas:
/// <reference no-default-lib="true"/>for type of thing. This answer is totally generic and would allow others to have their own implementations of other deployed libs.Cons:
I'd need to check, but this might mean looking for the pragmas across all @types dts files before we can reliably use the files in
lib