Skip to content

Commit

Permalink
fix: timer ts error
Browse files Browse the repository at this point in the history
  • Loading branch information
szg2008 committed Feb 10, 2023
1 parent 42ae426 commit 0711812
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/packages/__VUE/notify/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export default create({
};
// timer
let timer: null | number = null;
let timer: null | NodeJS.Timeout = null;
const clearTimer = () => {
timer && clearTimeout(timer);
timer = null;
Expand Down
2 changes: 1 addition & 1 deletion src/packages/__VUE/toast/index.taro.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default create({
},
emits: ['update:visible', 'closed'],
setup(props, { emit }) {
let timer: number | null | undefined;
let timer: NodeJS.Timeout | null | undefined;
const clearTimer = () => {
if (timer) {
clearTimeout(timer);
Expand Down

0 comments on commit 0711812

Please sign in to comment.