An annotation which is applied to a function or a class method to intercept its execution and call it multiple times until it succeeds. It returns the return value of the wrapped function on success throws the last error if all retry attempts fail.
Example:
class MyClass { @retry({ retryLimit: 3, timeLimit: 3000, delayer: fixedDelay(100), }) async updateFile(): Promise<void> { // ... }} Copy
class MyClass { @retry({ retryLimit: 3, timeLimit: 3000, delayer: fixedDelay(100), }) async updateFile(): Promise<void> { // ... }}
Retry options.
An annotation which is applied to a function or a class method to intercept its execution and call it multiple times until it succeeds. It returns the return value of the wrapped function on success throws the last error if all retry attempts fail.
Example: