close
Skip to content

export = in declarations file #73

Description

@fdecampredon

I try to use bluebird.
The definition file is like that.

declare module "bluebird" {

  declare class Promise<R>  {
    constructor(callback: (resolve : (result: R) => void, reject: (error: any) => void) => void): void;
    then<U>(onFulfill?: (value: R) => Promise<U> | U, onReject?: (error: any) => Promise<U> | U): Promise<U>;
    catch<U>(onRejected?: (error: any) => Promise<U> | U ): Promise<U>;
    static resolve<T>(thenable?: Promise<T> | T): Promise<T>;
    static reject(error: any): Promise<any>;
    static all<T>(promises: Array<Promise<T>>): Promise<Array<T>>;
    static race<T>(promises: Array<Promise<T>>): Promise<T>;
  }
}

The problem is that I have no way to declare that 'bluebird' is 'Promise', with typescript I would do :

export = Promise;

is there a way to declare such behavior ?

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions