Prechádzať zdrojové kódy

docs: debouncer docs & rename usage to signature

Sv443 3 mesiacov pred
rodič
commit
2fd60a9d20
2 zmenil súbory, kde vykonal 292 pridanie a 135 odobranie
  1. 290 133
      README.md
  2. 2 2
      lib/Debouncer.ts

Rozdielové dáta súboru neboli zobrazené, pretože súbor je príliš veľký
+ 290 - 133
README.md


+ 2 - 2
lib/Debouncer.ts

@@ -62,7 +62,7 @@ export class Debouncer<TArgs> extends NanoEmitter<DebouncerEventMap<TArgs>> {
 
   /** Adds a listener function that will be called on timeout */
   public addListener(fn: DebouncerFunc<TArgs>) {
-    return this.listeners.push(fn);
+    this.listeners.push(fn);
   }
 
   /** Removes the listener with the specified function reference */
@@ -90,7 +90,7 @@ export class Debouncer<TArgs> extends NanoEmitter<DebouncerEventMap<TArgs>> {
 
   /** Whether the timeout is currently active, meaning any latest call to the {@linkcode call()} method will be queued */
   public isTimeoutActive() {
-    return this.activeTimeout;
+    return typeof this.activeTimeout !== "undefined";
   }
 
   //#region type

Niektoré súbory nie sú zobrazené, pretože je v týchto rozdielových dátach zmenené mnoho súborov