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
Type checks fail when declarations are externally sourced from DefinitelyTyped or other.
Example error:
Could not find a declaration file for module 'svg-path-parser'. 'C:/Users/liama/Projects/Personal/svg-plotter/npm/node_modules/svg-path-parser/index.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/svg-path-parser` if it exists or add a new declaration (.d.ts) file containing `declare module 'svg-path-parser';
dnt should match the behaviour of deno with regards to type declaration resolution. If a referenced package URL responds with an external URL for type declarations, they should be included alongside the dependency list or statically downloaded alongside the source files.
The text was updated successfully, but these errors were encountered:
dsherret
changed the title
DefinitelyTyped (@types/) are not automatically added to package.json
DefinitelyTyped (@types/) are not automatically added to package.json from esm.sh
May 23, 2023
Background:
Deno supports automatically resolving type declarations for an external package when the server returns the X-Typescript-Types header.
Example:
GET https://esm.sh/svg-path-parser@1.1.0 >
Issue
Type checks fail when declarations are externally sourced from DefinitelyTyped or other.
Example error:
Generated
package.json
:Expected Behaviour
dnt
should match the behaviour ofdeno
with regards to type declaration resolution. If a referenced package URL responds with an external URL for type declarations, they should be included alongside the dependency list or statically downloaded alongside the source files.The text was updated successfully, but these errors were encountered: