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

@vibrant/types

Package Overview
Dependencies
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vibrant/types - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0-0

13

lib/index.d.ts

@@ -1,15 +0,14 @@

/// <reference types="bluebird" />
import * as Bluebird from 'bluebird';
export interface Callback<T> {
(err?: Error, result?: T): void;
}
export declare type Resolvable<T> = T | Bluebird<T>;
export declare type Resolvable<T> = T | Promise<T>;
export interface IndexedObject {
[key: string]: any;
}
export interface DeferredBluebird<R> {
resolve: (thenableOrResult: R | Bluebird.Thenable<R>) => void;
export declare class Defer<R> {
resolve: (thenableOrResult: R | Promise<R>) => void;
reject: (error: any) => void;
promise: Bluebird<R>;
promise: Promise<R>;
constructor();
}
export declare function defer<R>(): DeferredBluebird<R>;
export declare function defer<R>(): Defer<R>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Bluebird = require("bluebird");
var Defer = /** @class */ (function () {
function Defer() {
var _this = this;
this.promise = new Promise(function (_resolve, _reject) {
_this.resolve = _resolve;
_this.reject = _reject;
});
}
return Defer;
}());
exports.Defer = Defer;
function defer() {
var resolve;
var reject;
var promise = new Bluebird(function (_resolve, _reject) {
resolve = _resolve;
reject = _reject;
});
return { resolve: resolve, reject: reject, promise: promise };
return new Defer();
}
exports.defer = defer;
//# sourceMappingURL=index.js.map
{
"name": "@vibrant/types",
"version": "3.0.0",
"version": "3.1.0-0",
"description": "Common typings for vibrant",
"scripts": {
"build:module": "tsc",
"test": "echo \"Error: no test specified\" && exit 1"

@@ -11,10 +10,13 @@ },

"types": "lib/index.d.ts",
"author": "",
"license": "ISC",
"dependencies": {
"bluebird": "^3.5.1"
"author": {
"name": "akfish",
"email": "akfish@gmail.com"
},
"bugs": {
"url": "https://github.com/akfish/node-vibrant/issues"
},
"homepage": "https://github.com/akfish/node-vibrant",
"license": "MIT",
"devDependencies": {
"@types/bluebird": "^3.5.18",
"typescript": "latest"
"typescript": "^3.2.2"
},

@@ -21,0 +23,0 @@ "publishConfig": {

@@ -1,27 +0,25 @@

import * as Bluebird from 'bluebird'
export interface Callback<T> {
(err?: Error, result?: T): void
(err?: Error, result?: T): void
}
export type Resolvable<T> = T | Bluebird<T>
export type Resolvable<T> = T | Promise<T>
export interface IndexedObject {
[key: string]: any
[key: string]: any
}
export interface DeferredBluebird<R> {
resolve: (thenableOrResult: R | Bluebird.Thenable<R>) => void
reject: (error: any) => void
promise: Bluebird<R>
export class Defer<R> {
resolve: (thenableOrResult: R | Promise<R>) => void
reject: (error: any) => void
promise: Promise<R>
constructor () {
this.promise = new Promise<R>((_resolve, _reject) => {
this.resolve = _resolve
this.reject = _reject
})
}
}
export function defer<R>(): DeferredBluebird<R> {
let resolve: (thenableOrResult: R | Bluebird.Thenable<R>) => void
let reject: (error: any) => void
let promise = new Bluebird<R>((_resolve, _reject) => {
resolve = _resolve
reject = _reject
})
return { resolve, reject, promise }
}
export function defer<R> (): Defer<R> {
return new Defer<R>()
}

Sorry, the diff of this file is not supported yet

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