Type definitions missing
See original GitHub issueWhen I try to import the package in my Svelte project, I get the following error:
Could not find a declaration file for module 'svelte-portal'.
'node_modules/svelte-portal/src/main.cjs.js' implicitly has an 'any' type.
Try `npm i --save-dev @types/svelte-portal` if it exists or add a new declaration (.d.ts) file containing `declare module 'svelte-portal';`
Looking at the svelte-portal folder in node_modules, there indeed isn’t any .d.ts
file.
This is weird, sveltekit package
should produce both a compiled .svelte
file as well as .d.ts
file. (For comparison, projects like svelte-material-ui
do ship the .d.ts
files, and therefore work out-of-the-box.) Could you, by any chance, publish the package with the type definitions?
Issue Analytics
- State:
- Created a year ago
- Comments:8 (8 by maintainers)
Top Results From Across the Web
How to include missing type definition files in typescript ...
I would suggest switching to types from typeRoots and using an include pattern rather than files . { "compilerOptions": { "lib": ["dom" ...
Read more >How to Declare Missing Types for External Libraries -- newline
If DefinitelyTyped doesn't have type declarations for a library you can declare types yourself.
Read more >Typescript type definitions missing in 1.7.0 · Issue #32 - GitHub
We just went to upgrade to the latest version (1.7.0) and noticed that the type definitions were missing from the package.
Read more >Missing type definitions - IBM
Missing type definitions. DCM includes all user-defined type definitions in transfer packages. During a receive operation, DCM automatically creates ...
Read more >Missing type definition (typescript) - Handsontable Forum
Hi, We have upgraded to the latest version (11.1.0) and are experiencing missing type definitions for the samplingRatio and ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Did you try import Portal from “svelte-portal/src/Portal.svelte”?
Thanks, merged!