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
If you try to use the react module pinned to 17.0.2, it ignores the version when choosing the x-typescript-types header. Below is the url I used and the types header I got for it. The types header should be 17.0.2 like the module I'm importing.
This also applies to deps. If I make a request to the following, the types has no information about the dependency versions. In this example, the types ends up importing "https://cdn.esm.sh/v58/@types/[email protected]/index.d.ts" which is the wrong version of react. Having 2 different types files for react causes typescript errors due to duplicate identifiers.
It appears most other react based modules are using 17.0.37. to resolve this error I import 17.0.2 but use a deno types comment to have it use the 17.0.37 types instead of the 17.0.35 types from the x-typesceipt-types header.
Ideally the types would always match the version specified. I think I might have tried 17.0.2 types but they were not working. I don't recall.
Issue
If you try to use the react module pinned to 17.0.2, it ignores the version when choosing the x-typescript-types header. Below is the url I used and the types header I got for it. The types header should be 17.0.2 like the module I'm importing.
https://esm.sh/[email protected]
x-typescript-types
https://cdn.esm.sh/v58/@types/[email protected]/index.d.ts
This also applies to deps. If I make a request to the following, the types has no information about the dependency versions. In this example, the types ends up importing "https://cdn.esm.sh/v58/@types/[email protected]/index.d.ts" which is the wrong version of react. Having 2 different types files for react causes typescript errors due to duplicate identifiers.
https://esm.sh/[email protected][email protected],[email protected]
x-typescript-types
https://cdn.esm.sh/v58/[email protected]/index.d.ts
Additional info
The text was updated successfully, but these errors were encountered: