loopback-datasource-juggler/types/common.d.ts

29 lines
718 B
TypeScript
Raw Normal View History

2018-05-02 23:21:49 +00:00
// Copyright IBM Corp. 2018. All Rights Reserved.
// Node module: loopback-datasource-juggler
// This file is licensed under the MIT License.
// License text available at https://opensource.org/licenses/MIT
/**
* Objects with open properties
*/
export interface AnyObject<T = any> {
[property: string]: T;
}
/**
* Type alias for options object
*/
export type Options = AnyObject<any>;
/**
* Type alias for Node.js callback functions
*/
2018-06-29 06:35:22 +00:00
export type Callback<T = any> = (err?: any | null, result?: T) => void;
2018-05-02 23:21:49 +00:00
/**
* Return export type for promisified Node.js async methods.
*
* Note that starting with version 4.0, juggler uses native Promises.
2018-05-02 23:21:49 +00:00
*/
export type PromiseOrVoid<T = any> = Promise<T> | void;