This commit is contained in:
Schluffe
2026-03-05 23:36:33 +01:00
parent c2dce421b3
commit c6bb4abac0
12 changed files with 131 additions and 144 deletions
+2 -8
View File
@@ -1,9 +1,3 @@
export const componentMap = new Map();
import type { Box } from "#/engine/Box.ts";
export function defineComponent<T>(key: string): Map<string, T> {
if (!componentMap.has(key)) {
componentMap.set(key, new Map());
}
return componentMap.get(key)!;
}
export type Component<T> = Record<string, Box<T>>;