@ste_tisci/ecs 0.1.0 → 0.1.1

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/dist/index.d.cts CHANGED
@@ -28,12 +28,6 @@ type StoreDataMap<T> = {
28
28
  */
29
29
  type QueryResult<T, C extends (keyof T)[]> = {
30
30
  [K in C[number]]: { id: number };
31
- };
32
-
33
- type StoreInit<T> = {
34
- [K in keyof T]: {
35
- [P in keyof T[K]]: T[K][P][];
36
- };
37
31
  };
38
32
 
39
33
  /**
@@ -49,7 +43,7 @@ interface IECS<T> {
49
43
  * Must be called before any other operations.
50
44
  * @param components - Object mapping component names to their structure
51
45
  */
52
- defineComponents: (data: StoreInit<T>) => void;
46
+ defineComponents: (data: Partial<Record<keyof T, any>>) => void;
53
47
 
54
48
  /**
55
49
  * Creates a new entity in the ECS.
package/dist/index.d.ts CHANGED
@@ -28,12 +28,6 @@ type StoreDataMap<T> = {
28
28
  */
29
29
  type QueryResult<T, C extends (keyof T)[]> = {
30
30
  [K in C[number]]: { id: number };
31
- };
32
-
33
- type StoreInit<T> = {
34
- [K in keyof T]: {
35
- [P in keyof T[K]]: T[K][P][];
36
- };
37
31
  };
38
32
 
39
33
  /**
@@ -49,7 +43,7 @@ interface IECS<T> {
49
43
  * Must be called before any other operations.
50
44
  * @param components - Object mapping component names to their structure
51
45
  */
52
- defineComponents: (data: StoreInit<T>) => void;
46
+ defineComponents: (data: Partial<Record<keyof T, any>>) => void;
53
47
 
54
48
  /**
55
49
  * Creates a new entity in the ECS.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ste_tisci/ecs",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "A minimalistic game engine with zero dependencies based on the Entity Component System (ECS) architecture implemented in TypeScript",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",