Skip to main content
Module

x/retry/retry/tooManyTries.ts

Re-execute a function until it does not throw an error or execute a function with a timeout.
Very Popular
Latest
File
// Copyright since 2020, FranckLdx. All rights reserved. MIT license.export class TooManyTries extends Error { constructor() { super("function did not complete within allowed number of attempts"); } tooManyTries = true;}
export function isTooManyTries(error: Error): error is TooManyTries { return (error as TooManyTries).tooManyTries === true;}