/** * For node.js module.exports */ declare namespace module { let exports: any; } /** * Modified from https://github.com/then/promise/blob/master/index.d.ts */ declare class Promise { then(onfulfilled?: ((value: T) => T | PromiseLike) | undefined | null, onrejected?: ((reason: any) => T | PromiseLike) | undefined | null): Promise; then(onfulfilled: ((value: T) => T | PromiseLike) | undefined | null, onrejected: (reason: any) => TResult | PromiseLike): Promise; then(onfulfilled: (value: T) => TResult | PromiseLike, onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): Promise; then(onfulfilled: (value: T) => TResult1 | PromiseLike, onrejected: (reason: any) => TResult2 | PromiseLike): Promise; catch(onrejected?: ((reason: any) => T | PromiseLike) | undefined | null): Promise; catch(onrejected: (reason: any) => TResult | PromiseLike): Promise; }