@twin.org/engine-models 0.0.3-next.4 → 0.0.3-next.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/es/models/IEngineCore.js.map +1 -1
- package/dist/es/models/IEngineServer.js.map +1 -1
- package/dist/es/models/config/IEngineCoreTypeConfig.js.map +1 -1
- package/dist/es/models/engineTypeInitialiser.js.map +1 -1
- package/dist/types/models/IEngineCore.d.ts +26 -4
- package/dist/types/models/IEngineServer.d.ts +2 -2
- package/dist/types/models/config/IEngineCoreTypeConfig.d.ts +4 -0
- package/dist/types/models/engineTypeInitialiser.d.ts +6 -6
- package/docs/changelog.md +416 -106
- package/docs/examples.md +52 -1
- package/docs/reference/interfaces/EngineTypeInitialiserReturn.md +28 -8
- package/docs/reference/interfaces/IEngineCore.md +98 -30
- package/docs/reference/interfaces/IEngineCoreClone.md +5 -5
- package/docs/reference/interfaces/IEngineCoreConfig.md +6 -6
- package/docs/reference/interfaces/IEngineCoreContext.md +5 -5
- package/docs/reference/interfaces/IEngineCoreTypeBaseConfig.md +3 -3
- package/docs/reference/interfaces/IEngineModuleConfig.md +9 -9
- package/docs/reference/interfaces/IEngineServer.md +7 -7
- package/docs/reference/interfaces/IEngineStateStorage.md +4 -4
- package/docs/reference/type-aliases/EngineTypeInitialiser.md +7 -3
- package/docs/reference/type-aliases/IEngineCoreTypeConfig.md +13 -7
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TWIN Engine Models
|
|
2
2
|
|
|
3
|
-
Models
|
|
3
|
+
Engine Models defines shared contracts and factories used to compose runtime behaviour across the repository. It provides stable interfaces for core and server implementations so packages can interoperate with a clear and predictable structure.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEngineCore.js","sourceRoot":"","sources":["../../../src/models/IEngineCore.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IContextIds } from \"@twin.org/context\";\nimport type { IError } from \"@twin.org/core\";\nimport type { IEngineCoreConfig } from \"./config/IEngineCoreConfig.js\";\nimport type { IEngineCoreTypeConfig } from \"./config/IEngineCoreTypeConfig.js\";\nimport type { IEngineCoreClone } from \"./IEngineCoreClone.js\";\nimport type { IEngineState } from \"./IEngineState.js\";\n\n/**\n * Interface describing the engine core methods.\n */\nexport interface IEngineCore<\n\tC extends IEngineCoreConfig = IEngineCoreConfig,\n\tS extends IEngineState = IEngineState\n> {\n\t/**\n\t * Add a type initialiser.\n\t * @param type The type to add the initialiser for.\n\t * @param module The name of the module which contains the initialiser method.\n\t * @param method The name of the method to call.\n\t */\n\taddTypeInitialiser(type: string, module: string, method: string): void;\n\n\t/**\n\t * Get the type config for a specific type.\n\t * @param type The type to get the config for.\n\t * @returns The type config or undefined if not found.\n\t */\n\tgetTypeConfig(type: string): IEngineCoreTypeConfig[] | undefined;\n\n\t/**\n\t * Add a context ID key to the engine.\n\t * @param key The context ID key.\n\t * @param componentFeatures The component features for the context ID handler.\n\t */\n\taddContextIdKey(key: string, componentFeatures: string[]): void;\n\n\t/**\n\t * Get the context ID keys for the engine.\n\t * @returns The context IDs keys.\n\t */\n\tgetContextIdKeys(): string[];\n\n\t/**\n\t * Add a context ID to the engine.\n\t * @param key The context ID key.\n\t * @param value The context ID value.\n\t */\n\taddContextId(key: string, value: string): void;\n\n\t/**\n\t * Get the context IDs for the engine.\n\t * @returns The context IDs or undefined if none are set.\n\t */\n\tgetContextIds(): IContextIds | undefined;\n\n\t/**\n\t * Start the engine core.\n\t * @
|
|
1
|
+
{"version":3,"file":"IEngineCore.js","sourceRoot":"","sources":["../../../src/models/IEngineCore.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IContextIds } from \"@twin.org/context\";\nimport type { IComponent, IError } from \"@twin.org/core\";\nimport type { IEngineCoreConfig } from \"./config/IEngineCoreConfig.js\";\nimport type { IEngineCoreTypeConfig } from \"./config/IEngineCoreTypeConfig.js\";\nimport type { IEngineCoreClone } from \"./IEngineCoreClone.js\";\nimport type { IEngineState } from \"./IEngineState.js\";\n\n/**\n * Interface describing the engine core methods.\n */\nexport interface IEngineCore<\n\tC extends IEngineCoreConfig = IEngineCoreConfig,\n\tS extends IEngineState = IEngineState\n> {\n\t/**\n\t * Add a type initialiser.\n\t * @param type The type to add the initialiser for.\n\t * @param module The name of the module which contains the initialiser method.\n\t * @param method The name of the method to call.\n\t */\n\taddTypeInitialiser(type: string, module: string, method: string): void;\n\n\t/**\n\t * Get the type config for a specific type.\n\t * @param type The type to get the config for.\n\t * @returns The type config or undefined if not found.\n\t */\n\tgetTypeConfig(type: string): IEngineCoreTypeConfig[] | undefined;\n\n\t/**\n\t * Add a context ID key to the engine.\n\t * @param key The context ID key.\n\t * @param componentFeatures The component features for the context ID handler.\n\t */\n\taddContextIdKey(key: string, componentFeatures: string[]): void;\n\n\t/**\n\t * Get the context ID keys for the engine.\n\t * @returns The context IDs keys.\n\t */\n\tgetContextIdKeys(): string[];\n\n\t/**\n\t * Add a context ID to the engine.\n\t * @param key The context ID key.\n\t * @param value The context ID value.\n\t */\n\taddContextId(key: string, value: string): void;\n\n\t/**\n\t * Get the context IDs for the engine.\n\t * @returns The context IDs or undefined if none are set.\n\t */\n\tgetContextIds(): IContextIds | undefined;\n\n\t/**\n\t * Start the engine core.\n\t * @param skipComponentStart Should the component start be skipped.\n\t * @returns Nothing.\n\t */\n\tstart(skipComponentStart?: boolean): Promise<void>;\n\n\t/**\n\t * Stop the engine core.\n\t * @returns Nothing.\n\t */\n\tstop(): Promise<void>;\n\n\t/**\n\t * Is the engine started.\n\t * @returns True if the engine is started.\n\t */\n\tisStarted(): boolean;\n\n\t/**\n\t * Is this the primary engine instance.\n\t * @returns True if the engine is the primary instance.\n\t */\n\tisPrimary(): boolean;\n\n\t/**\n\t * Is this engine instance a clone.\n\t * @returns True if the engine instance is a clone.\n\t */\n\tisClone(): boolean;\n\n\t/**\n\t * Log info.\n\t * @param message The message to log.\n\t */\n\tlogInfo(message: string): void;\n\n\t/**\n\t * Log error.\n\t * @param error The error to log.\n\t */\n\tlogError(error: IError): void;\n\n\t/**\n\t * Get the config for the engine.\n\t * @returns The config for the engine.\n\t */\n\tgetConfig(): C;\n\n\t/**\n\t * Get the state of the engine.\n\t * @returns The state of the engine.\n\t */\n\tgetState(): S;\n\n\t/**\n\t * Set the state to dirty so it gets saved.\n\t */\n\tsetStateDirty(): void;\n\n\t/**\n\t * Get all the registered instances.\n\t * @returns The registered instances.\n\t */\n\tgetRegisteredInstances(): {\n\t\t[name: string]: {\n\t\t\ttype: string;\n\t\t\tfeatures?: string[];\n\t\t}[];\n\t};\n\n\t/**\n\t * Get the registered instance type for the component/connector.\n\t * @param componentConnectorType The type of the component/connector.\n\t * @param features The requested features of the component, if not specified the default entry will be retrieved.\n\t * @returns The instance type matching the criteria if one is registered.\n\t * @throws If a matching instance was not found.\n\t */\n\tgetRegisteredInstanceType(componentConnectorType: string, features?: string[]): string;\n\n\t/**\n\t * Get the registered instance type for the component/connector.\n\t * @param componentConnectorType The type of the component/connector.\n\t * @param features The requested features of the component, if not specified the default entry will be retrieved.\n\t * @returns The instance type matching the criteria if one is registered.\n\t */\n\tgetRegisteredInstanceTypeOptional(\n\t\tcomponentConnectorType: string,\n\t\tfeatures?: string[]\n\t): string | undefined;\n\n\t/**\n\t * Get the registered components.\n\t * @returns The registered components.\n\t */\n\tgetRegisteredComponents(): Promise<\n\t\t{\n\t\t\tinstanceType: string;\n\t\t\tcomponent: IComponent;\n\t\t\tinitialised: boolean;\n\t\t}[]\n\t>;\n\n\t/**\n\t * Add a registered component to the engine.\n\t * @param instanceType The instance type to register the component under.\n\t * @param component The component to register.\n\t * @returns Nothing.\n\t */\n\taddRegisteredComponent(instanceType: string, component: IComponent): Promise<void>;\n\n\t/**\n\t * Get the data required to create a clone of the engine.\n\t * @returns The clone data.\n\t */\n\tgetCloneData(): IEngineCoreClone<C, S>;\n\n\t/**\n\t * Populate the engine from the clone data.\n\t * @param cloneData The clone data to populate from.\n\t * @param contextIds The context IDs to use for the clone.\n\t * @param silent Should the clone be silent.\n\t */\n\tpopulateClone(\n\t\tcloneData: IEngineCoreClone<C, S>,\n\t\tcontextIds?: IContextIds,\n\t\tsilent?: boolean\n\t): void;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEngineServer.js","sourceRoot":"","sources":["../../../src/models/IEngineServer.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface describing the engine server methods.\n */\nexport interface IEngineServer {\n\t/**\n\t * Add a REST route generator.\n\t * @param type The type to add the generator for.\n\t * @param module The module containing the generator.\n\t * @param method The method to call on the module.\n\t */\n\taddRestRouteGenerator(type: string, module: string, method: string): void;\n\n\t/**\n\t * Add a socket route generator.\n\t * @param type The type to add the generator for.\n\t * @param module The module containing the generator.\n\t * @param method The method to call on the module.\n\t */\n\taddSocketRouteGenerator(type: string, module: string, method: string): void;\n\n\t/**\n\t * Start the engine server.\n\t * @returns
|
|
1
|
+
{"version":3,"file":"IEngineServer.js","sourceRoot":"","sources":["../../../src/models/IEngineServer.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAChC,uCAAuC","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\n\n/**\n * Interface describing the engine server methods.\n */\nexport interface IEngineServer {\n\t/**\n\t * Add a REST route generator.\n\t * @param type The type to add the generator for.\n\t * @param module The module containing the generator.\n\t * @param method The method to call on the module.\n\t */\n\taddRestRouteGenerator(type: string, module: string, method: string): void;\n\n\t/**\n\t * Add a socket route generator.\n\t * @param type The type to add the generator for.\n\t * @param module The module containing the generator.\n\t * @param method The method to call on the module.\n\t */\n\taddSocketRouteGenerator(type: string, module: string, method: string): void;\n\n\t/**\n\t * Start the engine server.\n\t * @returns Nothing.\n\t */\n\tstart(): Promise<void>;\n\n\t/**\n\t * Stop the engine server.\n\t * @returns Nothing.\n\t */\n\tstop(): Promise<void>;\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IEngineCoreTypeConfig.js","sourceRoot":"","sources":["../../../../src/models/config/IEngineCoreTypeConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineCoreTypeBaseConfig } from \"./IEngineCoreTypeBaseConfig.js\";\n\n/**\n * Configuration for the engine core type.\n */\nexport type IEngineCoreTypeConfig<T extends IEngineCoreTypeBaseConfig = IEngineCoreTypeBaseConfig> =\n\tT & {\n\t\t/**\n\t\t * The instance type to override with.\n\t\t */\n\t\toverrideInstanceType?: string;\n\n\t\t/**\n\t\t * Whether this is the default instance.\n\t\t */\n\t\tisDefault?: boolean;\n\n\t\t/**\n\t\t * The features supported by this instance.\n\t\t */\n\t\tfeatures?: string[];\n\n\t\t/**\n\t\t * The path for the REST API.\n\t\t */\n\t\trestPath?: string;\n\n\t\t/**\n\t\t * The options for the REST API route generation.\n\t\t */\n\t\trestOptions?: unknown;\n\n\t\t/**\n\t\t * The path for the socket API.\n\t\t */\n\t\tsocketPath?: string;\n\n\t\t/**\n\t\t * The options for the socket API route generation.\n\t\t */\n\t\tsocketOptions?: unknown;\n\t};\n"]}
|
|
1
|
+
{"version":3,"file":"IEngineCoreTypeConfig.js","sourceRoot":"","sources":["../../../../src/models/config/IEngineCoreTypeConfig.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { IEngineCoreTypeBaseConfig } from \"./IEngineCoreTypeBaseConfig.js\";\n\n/**\n * Configuration for the engine core type.\n */\nexport type IEngineCoreTypeConfig<T extends IEngineCoreTypeBaseConfig = IEngineCoreTypeBaseConfig> =\n\tT & {\n\t\t/**\n\t\t * The instance type to override with.\n\t\t */\n\t\toverrideInstanceType?: string;\n\n\t\t/**\n\t\t * Whether this is the default instance.\n\t\t */\n\t\tisDefault?: boolean;\n\n\t\t/**\n\t\t * Whether this is a multi-instance component.\n\t\t */\n\t\tisMultiInstance?: boolean;\n\n\t\t/**\n\t\t * The features supported by this instance.\n\t\t */\n\t\tfeatures?: string[];\n\n\t\t/**\n\t\t * The path for the REST API.\n\t\t */\n\t\trestPath?: string;\n\n\t\t/**\n\t\t * The options for the REST API route generation.\n\t\t */\n\t\trestOptions?: unknown;\n\n\t\t/**\n\t\t * The path for the socket API.\n\t\t */\n\t\tsocketPath?: string;\n\n\t\t/**\n\t\t * The options for the socket API route generation.\n\t\t */\n\t\tsocketOptions?: unknown;\n\t};\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"engineTypeInitialiser.js","sourceRoot":"","sources":["../../../src/models/engineTypeInitialiser.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { Factory, IComponent } from \"@twin.org/core\";\nimport type { IEngineCoreTypeBaseConfig } from \"./config/IEngineCoreTypeBaseConfig.js\";\nimport type { IEngineCore } from \"./IEngineCore.js\";\nimport type { IEngineCoreContext } from \"./IEngineCoreContext.js\";\n\n/**\n * Method definition for the engine type initialiser.\n */\nexport type EngineTypeInitialiser
|
|
1
|
+
{"version":3,"file":"engineTypeInitialiser.js","sourceRoot":"","sources":["../../../src/models/engineTypeInitialiser.ts"],"names":[],"mappings":"","sourcesContent":["// Copyright 2024 IOTA Stiftung.\n// SPDX-License-Identifier: Apache-2.0.\nimport type { Factory, IComponent } from \"@twin.org/core\";\nimport type { IEngineCoreTypeBaseConfig } from \"./config/IEngineCoreTypeBaseConfig.js\";\nimport type { IEngineCore } from \"./IEngineCore.js\";\nimport type { IEngineCoreContext } from \"./IEngineCoreContext.js\";\n\n/**\n * Method definition for the engine type initialiser.\n */\nexport type EngineTypeInitialiser<\n\tT extends IEngineCoreTypeBaseConfig = IEngineCoreTypeBaseConfig,\n\tF = Factory<unknown>\n> = (\n\tengineCore: IEngineCore,\n\tcontext: IEngineCoreContext,\n\tinstanceConfig: T\n) => EngineTypeInitialiserReturn<T, F>;\n\n/**\n * Engine type initialiser return type.\n */\nexport interface EngineTypeInitialiserReturn<\n\tT extends IEngineCoreTypeBaseConfig = IEngineCoreTypeBaseConfig,\n\tF = Factory<unknown>\n> {\n\t/**\n\t * The instance type created.\n\t */\n\tinstanceTypeName?: string;\n\n\t/**\n\t * The factory to store the instance in.\n\t */\n\tfactory?: F;\n\n\t/**\n\t * Create a new component.\n\t */\n\tcreateComponent?: (additionalConfig: T) => IComponent;\n}\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { IContextIds } from "@twin.org/context";
|
|
2
|
-
import type { IError } from "@twin.org/core";
|
|
2
|
+
import type { IComponent, IError } from "@twin.org/core";
|
|
3
3
|
import type { IEngineCoreConfig } from "./config/IEngineCoreConfig.js";
|
|
4
4
|
import type { IEngineCoreTypeConfig } from "./config/IEngineCoreTypeConfig.js";
|
|
5
5
|
import type { IEngineCoreClone } from "./IEngineCoreClone.js";
|
|
@@ -45,9 +45,10 @@ export interface IEngineCore<C extends IEngineCoreConfig = IEngineCoreConfig, S
|
|
|
45
45
|
getContextIds(): IContextIds | undefined;
|
|
46
46
|
/**
|
|
47
47
|
* Start the engine core.
|
|
48
|
-
* @
|
|
48
|
+
* @param skipComponentStart Should the component start be skipped.
|
|
49
|
+
* @returns Nothing.
|
|
49
50
|
*/
|
|
50
|
-
start(): Promise<
|
|
51
|
+
start(skipComponentStart?: boolean): Promise<void>;
|
|
51
52
|
/**
|
|
52
53
|
* Stop the engine core.
|
|
53
54
|
* @returns Nothing.
|
|
@@ -88,6 +89,10 @@ export interface IEngineCore<C extends IEngineCoreConfig = IEngineCoreConfig, S
|
|
|
88
89
|
* @returns The state of the engine.
|
|
89
90
|
*/
|
|
90
91
|
getState(): S;
|
|
92
|
+
/**
|
|
93
|
+
* Set the state to dirty so it gets saved.
|
|
94
|
+
*/
|
|
95
|
+
setStateDirty(): void;
|
|
91
96
|
/**
|
|
92
97
|
* Get all the registered instances.
|
|
93
98
|
* @returns The registered instances.
|
|
@@ -113,6 +118,22 @@ export interface IEngineCore<C extends IEngineCoreConfig = IEngineCoreConfig, S
|
|
|
113
118
|
* @returns The instance type matching the criteria if one is registered.
|
|
114
119
|
*/
|
|
115
120
|
getRegisteredInstanceTypeOptional(componentConnectorType: string, features?: string[]): string | undefined;
|
|
121
|
+
/**
|
|
122
|
+
* Get the registered components.
|
|
123
|
+
* @returns The registered components.
|
|
124
|
+
*/
|
|
125
|
+
getRegisteredComponents(): Promise<{
|
|
126
|
+
instanceType: string;
|
|
127
|
+
component: IComponent;
|
|
128
|
+
initialised: boolean;
|
|
129
|
+
}[]>;
|
|
130
|
+
/**
|
|
131
|
+
* Add a registered component to the engine.
|
|
132
|
+
* @param instanceType The instance type to register the component under.
|
|
133
|
+
* @param component The component to register.
|
|
134
|
+
* @returns Nothing.
|
|
135
|
+
*/
|
|
136
|
+
addRegisteredComponent(instanceType: string, component: IComponent): Promise<void>;
|
|
116
137
|
/**
|
|
117
138
|
* Get the data required to create a clone of the engine.
|
|
118
139
|
* @returns The clone data.
|
|
@@ -121,7 +142,8 @@ export interface IEngineCore<C extends IEngineCoreConfig = IEngineCoreConfig, S
|
|
|
121
142
|
/**
|
|
122
143
|
* Populate the engine from the clone data.
|
|
123
144
|
* @param cloneData The clone data to populate from.
|
|
145
|
+
* @param contextIds The context IDs to use for the clone.
|
|
124
146
|
* @param silent Should the clone be silent.
|
|
125
147
|
*/
|
|
126
|
-
populateClone(cloneData: IEngineCoreClone<C, S>, silent?: boolean): void;
|
|
148
|
+
populateClone(cloneData: IEngineCoreClone<C, S>, contextIds?: IContextIds, silent?: boolean): void;
|
|
127
149
|
}
|
|
@@ -18,9 +18,9 @@ export interface IEngineServer {
|
|
|
18
18
|
addSocketRouteGenerator(type: string, module: string, method: string): void;
|
|
19
19
|
/**
|
|
20
20
|
* Start the engine server.
|
|
21
|
-
* @returns
|
|
21
|
+
* @returns Nothing.
|
|
22
22
|
*/
|
|
23
|
-
start(): Promise<
|
|
23
|
+
start(): Promise<void>;
|
|
24
24
|
/**
|
|
25
25
|
* Stop the engine server.
|
|
26
26
|
* @returns Nothing.
|
|
@@ -11,6 +11,10 @@ export type IEngineCoreTypeConfig<T extends IEngineCoreTypeBaseConfig = IEngineC
|
|
|
11
11
|
* Whether this is the default instance.
|
|
12
12
|
*/
|
|
13
13
|
isDefault?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Whether this is a multi-instance component.
|
|
16
|
+
*/
|
|
17
|
+
isMultiInstance?: boolean;
|
|
14
18
|
/**
|
|
15
19
|
* The features supported by this instance.
|
|
16
20
|
*/
|
|
@@ -5,21 +5,21 @@ import type { IEngineCoreContext } from "./IEngineCoreContext.js";
|
|
|
5
5
|
/**
|
|
6
6
|
* Method definition for the engine type initialiser.
|
|
7
7
|
*/
|
|
8
|
-
export type EngineTypeInitialiser<T extends IEngineCoreTypeBaseConfig = IEngineCoreTypeBaseConfig
|
|
8
|
+
export type EngineTypeInitialiser<T extends IEngineCoreTypeBaseConfig = IEngineCoreTypeBaseConfig, F = Factory<unknown>> = (engineCore: IEngineCore, context: IEngineCoreContext, instanceConfig: T) => EngineTypeInitialiserReturn<T, F>;
|
|
9
9
|
/**
|
|
10
10
|
* Engine type initialiser return type.
|
|
11
11
|
*/
|
|
12
|
-
export interface EngineTypeInitialiserReturn {
|
|
12
|
+
export interface EngineTypeInitialiserReturn<T extends IEngineCoreTypeBaseConfig = IEngineCoreTypeBaseConfig, F = Factory<unknown>> {
|
|
13
13
|
/**
|
|
14
14
|
* The instance type created.
|
|
15
15
|
*/
|
|
16
|
-
|
|
16
|
+
instanceTypeName?: string;
|
|
17
17
|
/**
|
|
18
18
|
* The factory to store the instance in.
|
|
19
19
|
*/
|
|
20
|
-
factory?:
|
|
20
|
+
factory?: F;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Create a new component.
|
|
23
23
|
*/
|
|
24
|
-
|
|
24
|
+
createComponent?: (additionalConfig: T) => IComponent;
|
|
25
25
|
}
|