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

@js-bits/xpromise

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@js-bits/xpromise - npm Package Compare versions

Comparing version 1.0.8 to 1.0.9

14

dist/index.d.ts

@@ -19,12 +19,2 @@ export default ExtendablePromise;

/**
* @type {'ExtendablePromise|InstantiationError'}
* @readonly
*/
static readonly InstantiationError: 'ExtendablePromise|InstantiationError';
/**
* @type {'ExtendablePromise|ExecutionError'}
* @readonly
*/
static readonly ExecutionError: 'ExtendablePromise|ExecutionError';
/**
* Creates new `ExtendablePromise` instance.

@@ -64,3 +54,7 @@ * @param {(resolve:Resolve<T>, reject:Reject, ...rest:unknown[]) => void} executor - A function to be executed by the `.execute()` method

}
declare namespace ExtendablePromise {
const ExecutionError: "ExtendablePromise|ExecutionError";
const InstantiationError: "ExtendablePromise|InstantiationError";
}
import * as UniqueSymbols from '@js-bits/enumerate/types/unique-symbols';

@@ -38,14 +38,2 @@ import enumerate from '@js-bits/enumerate';

/**
* @type {'ExtendablePromise|InstantiationError'}
* @readonly
*/
static InstantiationError = ERRORS.InstantiationError;
/**
* @type {'ExtendablePromise|ExecutionError'}
* @readonly
*/
static ExecutionError = ERRORS.ExecutionError;
/**
* Creates new `ExtendablePromise` instance.

@@ -134,2 +122,6 @@ * @param {(resolve:Resolve<T>, reject:Reject, ...rest:unknown[]) => void} executor - A function to be executed by the `.execute()` method

// Assigning properties one by one helps typescript to declare the namespace properly
ExtendablePromise.ExecutionError = ERRORS.ExecutionError;
ExtendablePromise.InstantiationError = ERRORS.InstantiationError;
export default ExtendablePromise;

@@ -35,3 +35,3 @@ /* eslint-disable max-classes-per-file, import/no-extraneous-dependencies, no-unused-vars */

test('should throw a sync error', () => {
expect.assertions(3);
expect.assertions(4);
promise = undefined;

@@ -42,2 +42,3 @@ try {

expect(error.name).toEqual('ExtendablePromise|InstantiationError');
expect(error.name).toEqual(ExtendablePromise.InstantiationError);
expect(error.message).toEqual('Invalid executor type: null');

@@ -44,0 +45,0 @@ }

{
"name": "@js-bits/xpromise",
"version": "1.0.8",
"version": "1.0.9",
"description": "Extendable Promise",

@@ -5,0 +5,0 @@ "keywords": [

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