Skip to content

Commit

Permalink
feat(Config): implement formalized Config service
Browse files Browse the repository at this point in the history
  • Loading branch information
RWOverdijk committed Sep 22, 2018
1 parent 6af926e commit 9f9ad5f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 0 additions & 2 deletions src/Library/Config/Config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
import { ConfigType } from './ConfigInterface';

interface ConfigData { [key: string]: any; }

export class Config {
Expand Down
2 changes: 2 additions & 0 deletions src/Library/Config/ConfigInterface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ import { ModuleManagerConfigInterface } from './ModuleManagerConfigInterface';
import { LoggerConfigInterface } from './LoggerConfigInterface';
import { ResponseConfigInterface } from './ResponseConfigInterface';
import { RouterConfigInterface } from './RouterConfigInterface';
import { ServiceManagerConfigType } from '../ServiceManager';

export type ConfigType = Partial<{
controller: ControllerManagerConfigType;
response: ResponseConfigInterface;
router: RouterConfigInterface;
logger: LoggerConfigInterface;
server: ServerConfigInterface;
services: ServiceManagerConfigType;
modules: ModuleManagerConfigInterface;
[key: string]: any;
}>;
2 changes: 1 addition & 1 deletion src/Library/Config/ControllerManagerConfigType.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ServiceManagerConfigType } from '../ServiceManager';

export type ControllerManagerConfigType = Partial<{
location: string;
locations: string[];
controllers: ServiceManagerConfigType;
}>;
2 changes: 1 addition & 1 deletion src/Library/Config/RouterConfigInterface.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { RouteInterface } from '../Router';

export interface RouterConfigInterface {
routes: Array<RouteInterface>;
routes?: Array<RouteInterface>;
}

0 comments on commit 9f9ad5f

Please sign in to comment.