UNPKG

723 BTypeScriptView Raw
1// Copyright IBM Corp. 2018,2019. All Rights Reserved.
2// Node module: loopback-datasource-juggler
3// This file is licensed under the MIT License.
4// License text available at https://opensource.org/licenses/MIT
5
6/**
7 * Objects with open properties
8 */
9export interface AnyObject<T = any> {
10 [property: string]: T;
11}
12
13/**
14 * Type alias for options object
15 */
16export type Options = AnyObject<any>;
17
18/**
19 * Type alias for Node.js callback functions
20 */
21export type Callback<T = any> = (err?: any | null, result?: T) => void;
22
23/**
24 * Return export type for promisified Node.js async methods.
25 *
26 * Note that starting with version 4.0, juggler uses native Promises.
27 */
28export type PromiseOrVoid<T = any> = Promise<T> | void;