Interfaces
CallbackifyAllOptions
CallbackMethod
PromiseMethod
PromisifyAllOptions
PromisifyOptions
WithPromise
Functions
callbackify(originalMethod)
export declare function callbackify(originalMethod: CallbackMethod): CallbackMethod;
Wraps a promisy type function to conditionally call a callback function.
Parameter | |
---|---|
Name | Description |
originalMethod | CallbackMethod The method to callbackify. |
Returns | |
---|---|
Type | Description |
CallbackMethod |
callbackifyAll(Class, options)
export declare function callbackifyAll(Class: Function, options?: CallbackifyAllOptions): void;
Callbackifies certain Class methods. This will not callbackify private or streaming methods.
Parameters | |
---|---|
Name | Description |
Class | Function Service class. |
options | CallbackifyAllOptions Configuration object. |
Returns | |
---|---|
Type | Description |
void |
promisify(originalMethod, options)
export declare function promisify(originalMethod: PromiseMethod, options?: PromisifyOptions): any;
Wraps a callback style function to conditionally return a promise.
Parameters | |
---|---|
Name | Description |
originalMethod | PromiseMethod The method to promisify. |
options | PromisifyOptions Promise options. |
Returns | |
---|---|
Type | Description |
any |
promisifyAll(Class, options)
export declare function promisifyAll(Class: Function, options?: PromisifyAllOptions): void;
Promisifies certain Class methods. This will not promisify private or streaming methods.
Parameters | |
---|---|
Name | Description |
Class | Function Service class. |
options | PromisifyAllOptions Configuration object. |
Returns | |
---|---|
Type | Description |
void |