Add record typings

This commit is contained in:
daimond113 2025-08-20 14:47:09 +02:00
parent 2d9432ab7a
commit 5ecc0b2657
No known key found for this signature in database

8
jecs.d.ts vendored
View file

@ -345,3 +345,11 @@ export function bulk_insert<const C extends Id[]>(
values: InferComponents<C>, values: InferComponents<C>,
): void; ): void;
export function bulk_remove(world: World, entity: Entity, ids: Id[]): void; export function bulk_remove(world: World, entity: Entity, ids: Id[]): void;
export type EntityRecord<E extends Entity> = {
archetype: Archetype<[E]>,
row: number,
dense: number,
};
export function record<E extends Entity>(world: World, entity: E): EntityRecord<E>;