1+ import { Context } from "@nanoforge/common" ;
2+
13// TypeScript bindings for emscripten-generated code. Automatically generated at compile time.
2- interface WasmModule {
3- }
4+ interface WasmModule { }
45
56export interface ClassHandle {
67 isAliasOf ( other : ClassHandle ) : boolean ;
@@ -39,15 +40,16 @@ export interface Entity extends ClassHandle {
3940 getId ( ) : number ;
4041}
4142
42- type Component = { name : string , [ key : string ] : any } ;
43+ type Component = { name : string ; [ key : string ] : any } ;
4344
44- type System = ( registry : Registry , ctx : any ) => void ;
45+ type System = ( registry : Registry , ctx : Context ) => void ;
4546
4647export interface Registry extends ClassHandle {
4748 registerComponent ( _0 : Component ) : SparseArray ;
4849 getComponentsConst ( _0 : Component ) : SparseArray ;
4950 getComponents ( _0 : Component ) : SparseArray ;
5051 spawnEntity ( ) : Entity ;
52+ getZipper ( _0 : Component [ ] ) : any [ ] ;
5153 killEntity ( _0 : Entity ) : void ;
5254 clearEntities ( ) : void ;
5355 removeComponent ( _0 : Entity , _1 : Component ) : void ;
@@ -60,23 +62,22 @@ export interface Registry extends ClassHandle {
6062 getEntityComponent ( _0 : Entity , _1 : Component ) : any | undefined ;
6163 addComponent ( _0 : Entity , _1 : Component ) : any | undefined ;
6264 runSystems ( _0 : any ) : void ;
63- getZipper ( _0 : Component [ ] ) : any ;
6465}
6566
6667interface EmbindModule {
6768 container : {
68- new ( ) : container ;
69+ new ( ) : container ;
6970 } ;
7071 SparseArray : {
71- new ( ) : SparseArray ;
72+ new ( ) : SparseArray ;
7273 } ;
7374 Entity : {
74- new ( _0 : number ) : Entity ;
75+ new ( _0 : number ) : Entity ;
7576 } ;
7677 Registry : {
77- new ( ) : Registry ;
78+ new ( ) : Registry ;
7879 } ;
7980}
8081
8182export type MainModule = WasmModule & EmbindModule ;
82- export default function MainModuleFactory ( options ?: unknown ) : Promise < MainModule > ;
83+ export default function MainModuleFactory ( options ?: unknown ) : Promise < MainModule > ;
0 commit comments