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
Describe the bug
The new reference types introduced in 2d1193c result in svelte-check errors when SMUI components are imported into a JavaScript Svelte project.
To Reproduce
Steps to reproduce the behavior:
Create a new svelte project: npm create svelte@latest my-app
a. Choose "Library project"
b. Choose "Yes, using JavaScript with JSDoc comments"
Import a SMUI element into the app, e.g. npm i -D @smui/button
For anyone who needs a workaround in the meantime, I was able to get around these errors by adding "noResolve": true to the jsconfig.json's compilerOptions. A bit of a sledge hammer solution but it does the job
Describe the bug
The new reference types introduced in 2d1193c result in
svelte-check
errors when SMUI components are imported into a JavaScript Svelte project.To Reproduce
Steps to reproduce the behavior:
npm create svelte@latest my-app
a. Choose "Library project"
b. Choose "Yes, using JavaScript with JSDoc comments"
npm i -D @smui/button
npm run check
to run svelte-check. You should see errors such as:Expected behavior
Should be able to use SMUI components in TS and JS Svelte applications without errors.
Additional context
I believe the solution is to just add the
.d.ts
extension to all of these instances. E.g./// <reference types="./ambient-ripple.d.ts" />
Doing this locally fixed the errors for me.
The text was updated successfully, but these errors were encountered: