antoniandre / wave-ui

A UI framework for Vue.js 3 (and 2) with only the bright side. ☀️
https://antoniandre.github.io/wave-ui
MIT License
549 stars 40 forks source link

Could not find a declaration file for module 'wave-ui' #89

Closed antecrescent closed 2 years ago

antecrescent commented 2 years ago

Hello,

I'm currently trying to use wave-ui and/but I get the an alert in VSCode. I'm very new to front-end development, so this may not even be problem. Though as I'm on the latest version of wave-ui, I thought this may be worth reporting.

Versions: Vue : 3.2.37 Wave UI : 2.39.1

VSCode alert in line: import WaveUI from "wave-ui"

module "/node_modules/wave-ui/dist/wave-ui.umd"
Could not find a declaration file for module 'wave-ui'. '/node_modules/wave-ui/dist/wave-ui.umd.js' implicitly has an 'any' type.
Try npm i --save-dev @types/wave-ui if it exists or add a new declaration (.d.ts) file containing declare module 'wave-ui';ts(7016)

The main.js script :

import { createApp } from "vue";
import App from "./App.vue";
import WaveUI from "wave-ui"; // VSCode alert here
import "wave-ui/dist/wave-ui.css";

const app = createApp(App);

new WaveUI(app, {
    // Some Wave UI options
});

app.mount("#app");

See also issue #49

antoniandre commented 2 years ago

Hi @antecrescent, Thanks for reporting, there's currently no type definition for TS, but it is on my todo list for later. I think you can still go through without type definition, it's just less intellisense.