/** * Common types/interfaces such as Class/Constructor/Options/Callback */ /** * Interface for classes with `new` operator and static properties/methods */ export interface Class { new (...args: any[]): T; [property: string]: any; } /** * Interface for constructor functions without `new` operator, for example, * ``` * function Foo(x) { * if (!(this instanceof Foo)) { return new Foo(x); } * this.x = x; * } * ``` */ export interface ConstructorFunction { (...args: any[]): T; } /** * Constructor type - class or function */ export declare type Constructor = Class | ConstructorFunction; /** * Objects with open properties */ export interface AnyObject { [property: string]: any; } export declare type ObjectType = T | AnyObject; /** * Type alias for Node.js options object */ export declare type Options = AnyObject | null | undefined; /** * Type alias for Node.js callback functions */ export declare type Callback = (err: Error | string | null | undefined, result?: T) => void;