UNPKG

1.28 kBTypeScriptView Raw
1import {ConfigurationBase} from "./config";
2
3export declare abstract class IApplication {
4 /**
5 * Registers an application strategy e.g. an singleton service which to be used in application context
6 * @param {Function} serviceCtor
7 * @param {Function} strategyCtor
8 * @returns IApplication
9 */
10 abstract useStrategy(serviceCtor: void, strategyCtor: void): this;
11 /**
12 * @param {Function} serviceCtor
13 * @returns {boolean}
14 */
15 abstract hasStrategy(serviceCtor: void): boolean;
16
17 /**
18 * @param serviceCtor
19 */
20 abstract getStrategy<T>(serviceCtor: new() => T): T;
21
22 /**
23 * Gets the configuration of this application
24 * @returns {ConfigurationBase}
25 */
26 abstract getConfiguration(): ConfigurationBase;
27}
28
29export declare abstract class IApplicationService {
30 /**
31 * Gets the application of this service
32 * @returns {IApplication}
33 */
34 abstract getApplication(): IApplication;
35}
36
37export declare class ApplicationService implements IApplicationService {
38 /**
39 * @constructor
40 * @param {IApplication=} app
41 */
42 constructor(app: IApplication);
43 /**
44 * Gets the application of this service
45 * @returns {IApplication}
46 */
47 getApplication(): IApplication;
48}
49
\No newline at end of file