0
我有clearInterval函数的问题。在Typescript中,它突出显示红色“参数类型不匹配参数”。所以我无法注销用户。 下面是函数:clearInterval与句柄无效
private check() {
if (this.isLogged) {
var timer = setInterval(() => {
if(this.Expiration < new Date()) {
this.signOut.emit(true);
clearInterval(timer);
}
}, 3000);
}
}
我能做到这一点,而不是clearInterval?
timer = null;
你*很确定*这是'clearInterval'调用有你引用的错误? –