Skip to content

Instantly share code, notes, and snippets.

@amir-arad
Created November 21, 2016 18:53
Show Gist options
  • Save amir-arad/821de4ba949a389801dbb8560521e066 to your computer and use it in GitHub Desktop.
Save amir-arad/821de4ba949a389801dbb8560521e066 to your computer and use it in GitHub Desktop.
an addition to the bluebird descriptors
import * as Bluebird from "@types/bluebird";
declare module "bluebird" {
/**
* Returns a promise that is resolved by a node style callback function.
*/
export function fromNode<T>(resolver: (callback: (err: any, result?: Bluebird<T>) => void) => void, options?: Bluebird.FromNodeOptions): Bluebird<T>;
export function fromCallback<T>(resolver: (callback: (err: any, result?: Bluebird<T>) => void) => void, options?: Bluebird.FromNodeOptions): Bluebird<T>;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment