Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ts-retry-promise

Package Overview
Dependencies
Maintainers
1
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ts-retry-promise - npm Package Compare versions

Comparing version 0.7.1 to 0.8.0

3

dist/retry-promise.d.ts

@@ -23,3 +23,4 @@ export interface RetryConfig<T = any> {

declare class BaseError {
constructor(...args: unknown[]);
message?: string | undefined;
constructor(message?: string | undefined, ...args: unknown[]);
}

@@ -26,0 +27,0 @@ export declare class NotRetryableError extends BaseError {

@@ -194,7 +194,8 @@ "use strict";

var BaseError = /** @class */ (function () {
function BaseError() {
function BaseError(message) {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i] = arguments[_i];
for (var _i = 1; _i < arguments.length; _i++) {
args[_i - 1] = arguments[_i];
}
this.message = message;
Error.apply(this, args);

@@ -201,0 +202,0 @@ }

{
"name": "ts-retry-promise",
"version": "0.7.1",
"version": "0.8.0",
"license": "MIT",

@@ -5,0 +5,0 @@ "description": "retry for functions returning a promise",

# ts-retry-promise #
[![Build Status](https://github.com/normartin/ts-retry-promise/workflows/Node.js%20CI/badge.svg)](https://github.com/normartin/ts-retry-promise/actions?query=workflow%3A%22Node.js+CI%22)
[![Build Status](https://github.com/normartin/ts-retry-promise/workflows/Build/badge.svg?branch=master)](https://github.com/normartin/ts-retry-promise/actions/workflows/ci.yml?query=branch%3Amaster)
[![Coverage Status](https://coveralls.io/repos/github/normartin/ts-retry-promise/badge.svg?branch=master)](https://coveralls.io/github/normartin/ts-retry-promise?branch=master)

@@ -124,4 +124,4 @@ [![Dependencies](https://img.shields.io/badge/Dependencies-none-brightgreen)](https://github.com/normartin/ts-retry-promise/blob/master/package.json)

retry(async () => throw new NotRetryableError("This error"))
.catch(err => console.log(err.lastError), { retries: 'INFINITELY' });
retry(async () => { throw new NotRetryableError("This error") }, { retries: 'INFINITELY' })
.catch(err => console.log(err.lastError.message)); // will print "This error"
```

@@ -128,0 +128,0 @@

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc