From dae73bcea6bfdebe3c6f728b12c504811c21663f Mon Sep 17 00:00:00 2001 From: galela Date: Mon, 5 Jan 2026 09:56:11 +0100 Subject: [PATCH] fix: update node timeout type for debounce function --- samples/localities-nearby-poi/index.ts | 2 +- samples/stores-list-sync-map/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/localities-nearby-poi/index.ts b/samples/localities-nearby-poi/index.ts index 965b79de..00bf5ad0 100644 --- a/samples/localities-nearby-poi/index.ts +++ b/samples/localities-nearby-poi/index.ts @@ -462,7 +462,7 @@ document.addEventListener("click", (event) => { }); function debounce(func: (...args: any[]) => void, wait: number) { - let timeout: NodeJS.Timeout; + let timeout: ReturnType; return function executedFunction(...args: any[]) { const later = () => { clearTimeout(timeout); diff --git a/samples/stores-list-sync-map/index.ts b/samples/stores-list-sync-map/index.ts index 27416ce0..89518b67 100644 --- a/samples/stores-list-sync-map/index.ts +++ b/samples/stores-list-sync-map/index.ts @@ -227,7 +227,7 @@ function selectStoreOnList(storeId?: string) { // Debounce function function debounce(func: (...args: any[]) => void, wait: number) { - let timeout: NodeJS.Timeout; + let timeout: ReturnType; return (...args: any[]) => { clearTimeout(timeout); timeout = setTimeout(() => func(...args), wait);