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

resolvable-promise

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

resolvable-promise - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

dist/types.d.ts

20

dist/index.d.ts

@@ -0,6 +1,7 @@

import { Executor, Resolvable } from './types';
declare function Resolvable<T>(handler?: Executor<T>): Resolvable<T>;
declare namespace Resolvable {
var _a: typeof Resolvable;
export { _a as default };
}
declare type ResolvableConstructor = {
new <T>(promise?: Executor<T>): Resolvable<T>;
<T>(promise?: Executor<T>): Resolvable<T>;
};
declare const _default: ResolvableConstructor & {

@@ -10,12 +11,1 @@ default: ResolvableConstructor;

export = _default;
interface Resolvable<T> extends Promise<T> {
resolve: Resolve<T>;
reject: Reject;
}
declare type ResolvableConstructor = {
new <T>(promise?: Executor<T>): Resolvable<T>;
<T>(promise?: Executor<T>): Resolvable<T>;
};
declare type Executor<T> = Promise<T> | ((resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void);
declare type Resolve<T> = (value?: T) => void;
declare type Reject = (reason?: any) => void;
{
"name": "resolvable-promise",
"version": "2.0.2",
"version": "2.0.3",
"description": "Promises with the resolve and reject functions exposed",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -0,1 +1,3 @@

import { Executor, Reject, Resolvable, Resolve } from './types';
function Resolvable<T>(handler?: Executor<T>) {

@@ -26,13 +28,2 @@ let resolve!: Resolve<T>;

Resolvable.default = Resolvable;
export = Resolvable as unknown as ResolvableConstructor & {
default: ResolvableConstructor
};
interface Resolvable<T> extends Promise<T> {
resolve: Resolve<T>
reject: Reject
}
type ResolvableConstructor = {

@@ -43,7 +34,5 @@ new <T>(promise?: Executor<T>): Resolvable<T>

type Executor<T> =
| Promise<T>
| ((resolve: (value: T | PromiseLike<T>) => void, reject: (reason?: any) => void) => void);
type Resolve<T> = (value?: T) => void;
type Reject = (reason?: any) => void;
(Resolvable as any).default = Resolvable;
export = Resolvable as unknown as ResolvableConstructor & {
default: ResolvableConstructor
};

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