malekim / v-idle

A Vue.js plugin to detect idle/non-active users
https://malekim.github.io/v-idle/
MIT License
70 stars 8 forks source link

Is TypeScript supported? #32

Closed masus04 closed 7 months ago

masus04 commented 2 years ago

Our vueJs project is using typescript, so I was wondering if v-idle supports it and if so, how I can install it accordingly.

When installing according to readme i receive the following error, pointing to the import statement:

TS7016: Could not find a declaration file for module 'v-idle'. '/home/masus/workspace/ethz/ape-web-editor/frontend/ape-vue-app/node_modules/v-idle/build/vidle.min.js' implicitly has an 'any' type.
  Try `npm i --save-dev @types/v-idle` if it exists or add a new declaration (.d.ts) file containing `declare module 'v-idle';`

    10 |
  > 11 | import Vidle from 'v-idle'
       |                   ^^^^^^^^
    12 |
masus04 commented 2 years ago

Duplicate of #22

eladcandroid commented 2 years ago

@masus04 Please check here: https://github.com/eladcandroid/v-idle-3

malekim commented 7 months ago

Typescript definitions added