Justineo / vue-clamp

Clamping multiline text with ease.
https://vue-clamp.vercel.app
MIT License
697 stars 89 forks source link

Could not find a declaration file for module 'vue-clamp' #43

Open nc-csl opened 3 years ago

nc-csl commented 3 years ago

I get this error when trying to import (import VClamp from 'vue-clamp';)

TS7016: Could not find a declaration file for module 'vue-clamp'. 'C:/Users/csl/Documents/Arbejde/ERST/erst/virksomhedsguiden/frontend-components/node_modules/vue-clamp/dist/vue-clamp.js' implicitly has an 'any' type.   Try npm install @types/vue-clamp if it exists or add a new declaration (.d.ts) file containing declare module 'vue-clamp';

I have added transpileDependencies: ['vue-clamp', 'resize-detector'] to my vue.config.js.

nbrylevv commented 3 years ago

@nc-csl just add next line to your declare.d.ts

declare module 'vue-clamp';