import type ECSpresso from 'ecspresso'; /** * React context for providing the ECS instance to the component tree. * Wrap your UI root with ``. */ declare const EcsContext: import("react").Context | null>; export { EcsContext }; /** * Creates typed hooks bound to a specific world config. * * Call once at module scope with your world type, then use the * returned hooks in components anywhere under the `EcsContext.Provider`. * * @example * ```tsx * const ecs = ECSpresso.create() * .withResourceTypes<{ score: number; health: number }>() * .withEventTypes<{ enemyKilled: { id: number } }>() * .build(); * * type ECS = typeof ecs; * const { useResource, useEvent, useEcs } = createEcsHooks(); * ``` */ export declare function createEcsHooks>(): { readonly useEcs: () => W; readonly useResource: (key: K) => W["_cfg"]["resources"][K]; readonly useEvent: (type: E, callback: (data: W["_cfg"]["events"][E]) => void) => void; };