Typescript showing an error on the following statement:
// Import F7 Bundle
import Framework7 from 'framework7/lite-bundle';
The error is
Could not find a declaration file for module 'framework7/lite-bundle'. 'c:/Users/alona/dev/MyApp/node_modules/framework7/framework7-lite-bundle.esm.js' implicitly has an 'any' type.
If the 'framework7' package actually exposes this module, try adding a new declaration (.d.ts) file containing `declare module 'framework7/lite-bundle';`ts(7016)
I’m using the following dependency versions:
"devDependencies": {
"@sveltejs/vite-plugin-svelte": "^2.4.5",
"@tsconfig/svelte": "^5.0.2",
"svelte": "^4.2.0",
"svelte-check": "^3.5.1",
"tslib": "^2.6.2",
"typescript": "^5.2.2",
"vite": "^4.4.9"
},
"dependencies": { "framework7": "^8.3.0",
"framework7-icons": "^5.0.5",
"framework7-svelte": "^8.3.0",
}
Even with that tsc error, the application is running fine on the browser, however I don’t like leaving too many errors unattended.
For now I added a ts-ignore statement to ignore that error
// @ts-ignore
import Framework7 from 'framework7/lite-bundle';