-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Typescript support #30
Comments
Vue.use(IdleVue, {
eventEmitter: new Vue(),
store,
idleTime: 500
})
// Use either watch
@Watch('isAppIdle')
public onIdle() {
console.log('Idle')
}
// or hooks
public onActive() {
console.log('Active')
} This is work for me (using vue-class-component) |
And here is the index.d.ts |
Thank you so much for this |
Just to confirm, i can use either the index.d.ts or the Vue class component one? Or are they meant to be put together? |
You need to use that together |
This works perfectly. Thank you so much for your help |
Can you tell my what I might be doing wrong? Here's my Main.ts No errors, nothing happens. isAppIdle is undefined. ` Vue.config.productionTip = false; // Setup idle-vue Component.registerHooks([ new Vue({ |
FYI, you need to register the hooks before all of your codes.
And if you want to use it in decorator format, I suggest you give it a try
|
Cool, I'll check it out. We wrote Window.SetTimeout version in the meantime. We need a warning followed by a log out. I suppose I could add a timeout to OnIdle() |
Hi Guys,
Do you have typescript support? When I try following the example it tells me that on onIdle() is not a function?
The text was updated successfully, but these errors were encountered: