smartsystem/dist/index.d.ts
2016-10-12 14:01:15 +02:00

22 lines
531 B
TypeScript

/// <reference types="q" />
import * as q from 'q';
/**
* defines a LazyModule
*/
export declare class LazyModule<T> {
name: string;
nameIsPath: boolean;
cwd: string;
whenLoaded: q.Promise<T>;
private whenLoadedDeferred;
constructor(nameArg: string, cwdArg?: string);
/**
* loads the module
*/
load(): q.Promise<T>;
/**
* loads additional lazy modules specified as arguments and returns them in the promise for easy use
*/
loadAlso(...args: LazyModule<any>[]): void;
}