smartsystem/dist/index.d.ts

22 lines
531 B
TypeScript
Raw Normal View History

2016-10-11 23:41:30 +00:00
/// <reference types="q" />
import * as q from 'q';
/**
* defines a LazyModule
*/
export declare class LazyModule<T> {
name: string;
2016-10-12 12:01:15 +00:00
nameIsPath: boolean;
2016-10-11 23:41:30 +00:00
cwd: string;
2016-10-12 12:01:15 +00:00
whenLoaded: q.Promise<T>;
private whenLoadedDeferred;
2016-10-11 23:41:30 +00:00
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;
}