BaseApp
Type parameters
▪ T: SuperConstructor
▪ T: SuperConstructor
Hierarchy
↳ Module
Module
↳ BaseApp
↳ App
Implements
Index
Constructors
Properties
Methods
- afterShutdown
- configure
- debug
- getSelectableStates
- getState
- hasState
- initialize
- invokeAction
- isInDevelopment
- isInOneOfStates
- isInProduction
- isInState
- reset
- setState
- shutdown
- start
- stop
- validateState
Constructors
constructor
+ new BaseApp(props?
: AppProps): BaseApp
Overrides Module.constructor
Creates an instance of BaseApp. Creates an instance of BaseApp.
Parameters:
Name | Type | Description |
---|---|---|
props? | AppProps | Properties for BaseApp. |
Returns: BaseApp
Properties
Optional
app
• app? : BaseApp
Overrides void
config
• config: Configurable
Implementation of BaseApp.config
injector
• injector: Injector
Implementation of BaseApp.injector
Optional
log
• log? : Logger
modules
• modules: Module[]
state
• state: State
Implementation of BaseApp.state
Inherited from StatefulMixin.state
Overrides void
Static
STATES
▪ STATES: typeof STATES
Overrides void
Methods
afterShutdown
▸ afterShutdown(): Promise‹void›
On shutdown hook.
async
Returns: Promise‹void›
configure
▸ configure(props
: ConfigProps): void
Make it possible to override configuration (at any nested level).
Parameters:
Name | Type | Description |
---|---|---|
props | ConfigProps | Properties with relation path: value matching property types. |
Returns: void
debug
▸ debug(): void
Enables debug mode logging on application app. Must be enabled prior to initialization.
Returns: void
getSelectableStates
▸ getSelectableStates(): Record‹string, State›
Implementation of BaseApp
Inherited from StatefulMixin.getSelectableStates
Overrides Task.getSelectableStates
Returns: Record‹string, State›
getState
▸ getState(): State
Implementation of BaseApp
Inherited from StatefulMixin.getState
Returns: State
hasState
▸ hasState(): boolean
Implementation of BaseApp
Inherited from StatefulMixin.hasState
Returns: boolean
initialize
▸ initialize(): Promise‹void›
Implementation of BaseApp
Overrides Module.initialize
Initializes application.
async
Returns: Promise‹void›
invokeAction
▸ invokeAction(actionName
: string, options?
: ActionInvokingOptions): Promise‹void›
Implementation of BaseApp
Inherited from Module.invokeAction
Overrides void
Parameters:
Name | Type |
---|---|
actionName | string |
options? | ActionInvokingOptions |
Returns: Promise‹void›
isInDevelopment
▸ isInDevelopment(): boolean
Inherited from Module.isInDevelopment
Overrides void
Returns: boolean
isInOneOfStates
▸ isInOneOfStates(states
: State | State[]): boolean
Implementation of BaseApp
Inherited from StatefulMixin.isInOneOfStates
Overrides Task.isInOneOfStates
Parameters:
Name | Type |
---|---|
states | State | State[] |
Returns: boolean
isInProduction
▸ isInProduction(): boolean
Inherited from Module.isInProduction
Overrides void
Returns: boolean
isInState
▸ isInState(state
: State | State[]): boolean
Implementation of BaseApp
Inherited from StatefulMixin.isInState
Parameters:
Name | Type |
---|---|
state | State | State[] |
Returns: boolean
reset
▸ reset(): Promise‹void›
Implementation of BaseApp
Overrides void
Returns: Promise‹void›
setState
▸ setState(state
: State): void
Implementation of BaseApp
Inherited from StatefulMixin.setState
Parameters:
Name | Type |
---|---|
state | State |
Returns: void
shutdown
▸ shutdown(): Promise‹void›
Implementation of BaseApp
Shutdowns app.
async
Returns: Promise‹void›
start
▸ start(): Promise‹void›
Implementation of BaseApp
Overrides void
Returns: Promise‹void›
stop
▸ stop(): Promise‹void›
Implementation of BaseApp
Overrides void
Returns: Promise‹void›
validateState
▸ validateState(stateOrStates
: State | State[], error?
: Error): boolean
Implementation of BaseApp
Inherited from StatefulMixin.validateState
Overrides Task.validateState
Parameters:
Name | Type |
---|---|
stateOrStates | State | State[] |
error? | Error |
Returns: boolean