File tree Expand file tree Collapse file tree
packages/js-lib/src/decorators Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export function _Throttle<T extends AnyFunction>(
2828/**
2929 * Like `@_Debounce`, but for async methods. Guarantees every call returns a real Promise that
3030 * resolves (or rejects) with the coalesced invocation's result, so the declared `Promise<T>` return
31- * type stays accurate. Unlike `@_Debounce`, await`-ing a decorated method never silently yields
31+ * type stays accurate. Unlike `@_Debounce`, ` await`-ing a decorated method never silently yields
3232 * `undefined`.
3333 *
3434 * @experimental
Original file line number Diff line number Diff line change 1+ import { _anyToError } from '../error/error.util.js'
12import { pDefer } from '../promise/pDefer.js'
23import type { DeferredPromise } from '../promise/pDefer.js'
34import type { AnyAsyncFunction , AnyFunction } from '../types.js'
@@ -207,7 +208,7 @@ export function _asyncDebounce<T extends AnyAsyncFunction>(
207208 const result = await func . apply ( thisArg , args ! )
208209 d . resolve ( result )
209210 } catch ( err ) {
210- d . reject ( err as Error )
211+ d . reject ( _anyToError ( err ) )
211212 }
212213 }
213214
Original file line number Diff line number Diff line change 11import type { AnyObject , InstanceId } from '../types.js'
22
33/**
4- * Generic override of Typescript 's built in legacy MethodDecorator, that
4+ * Generic override of TypeScript 's built- in legacy MethodDecorator, that
55 * allows us to infer the parameters of the decorated method from the parameters
66 * of a decorator.
77 */
You can’t perform that action at this time.
0 commit comments