@adaas/a-concept 0.0.63 → 0.0.64

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.
@@ -0,0 +1,9 @@
1
+ import { A_TYPES__ScopeConstructor } from "./A-Scope.types";
2
+
3
+ export const A_CONSTANTS__DEFAULT_SCOPE_CREATION_PARAMS: A_TYPES__ScopeConstructor = {
4
+ name: '',
5
+ components: [],
6
+ fragments: [],
7
+ entities: [],
8
+ commands: [],
9
+ };
@@ -5,8 +5,25 @@ import { A_Fragment } from "../A-Fragment/A-Fragment.class"
5
5
  import { A_Scope } from "./A-Scope.class"
6
6
 
7
7
 
8
- export type A_TYPES__ScopeConstructor = {
9
-
8
+ export type A_TYPES__AllowedComponentsConstructor<T = A_Component> = new (...args: any[]) => T;
9
+ export type A_TYPES__AllowedEntitiesConstructor<T = A_Entity> = new (...args: any[]) => T;
10
+ export type A_TYPES__AllowedFragmentsConstructor<T = A_Fragment> = new (...args: any[]) => T;
11
+ export type A_TYPES__AllowedCommandsConstructor<T = A_Command> = new (...args: any[]) => T;
12
+ export type A_TYPES__AllowedScopesConstructor<T = A_Scope> = new (...args: any[]) => T;
13
+ export type A_TYPES__AllowedConstructors<T extends A_Component | A_Fragment | A_Entity | A_Command | A_Scope = any> =
14
+ | A_TYPES__AllowedComponentsConstructor<T>
15
+ | A_TYPES__AllowedFragmentsConstructor<T>
16
+ | A_TYPES__AllowedEntitiesConstructor<T>
17
+ | A_TYPES__AllowedCommandsConstructor<T>
18
+ | A_TYPES__AllowedScopesConstructor<T>;
19
+
20
+
21
+ export type A_TYPES__ScopeConstructor<
22
+ _ComponentType extends A_TYPES__AllowedComponentsConstructor[] = A_TYPES__AllowedComponentsConstructor[],
23
+ _CommandType extends A_TYPES__AllowedCommandsConstructor[] = A_TYPES__AllowedCommandsConstructor[],
24
+ _EntityType extends A_Entity[] = A_Entity[],
25
+ _FragmentType extends A_Fragment[] = A_Fragment[],
26
+ > = {
10
27
  /**
11
28
  * Scope Name
12
29
  */
@@ -14,32 +31,20 @@ export type A_TYPES__ScopeConstructor = {
14
31
  /**
15
32
  * A list of Context Fragments available in the Scope
16
33
  */
17
- fragments: Array<A_Fragment>
34
+ fragments: [..._FragmentType];
18
35
  /**
19
36
  * A set of Components available in the Scope
20
37
  */
21
- components: Array<{ new(...args: any[]): A_Component }>
22
-
38
+ components: [..._ComponentType],
23
39
  /**
24
40
  * A set of Entities available in the Scope
25
41
  *
26
42
  */
27
- entities: Array<A_Entity>
28
-
29
-
43
+ entities: [..._EntityType];
30
44
  /**
31
45
  * A set of Commands available in the Scope
32
46
  */
33
- commands: Array<{ new(...args: any[]): A_Command }>
34
-
35
- /**
36
- * A list of Features/Lifecycle Hooks available in the Scope
37
- */
38
- // import: Array<string>,
39
- /**
40
- * A list of Features/Lifecycle Hooks available to be exported from the Scope
41
- */
42
- // export: Array<string>
47
+ commands: [..._CommandType],
43
48
  }
44
49
 
45
50