mirror of
https://github.com/Ukendio/jecs.git
synced 2025-09-14 04:29:18 +00:00
Add record
types (#271)
Some checks are pending
Some checks are pending
* Add record typings * Correct
This commit is contained in:
parent
a6c2d7152e
commit
51b09549db
1 changed files with 8 additions and 0 deletions
8
jecs.d.ts
vendored
8
jecs.d.ts
vendored
|
@ -347,3 +347,11 @@ export function bulk_insert<const C extends Id[]>(
|
||||||
values: { [K in keyof C]: TagToUndefined<InferComponent<C[K]>> },
|
values: { [K in keyof C]: TagToUndefined<InferComponent<C[K]>> },
|
||||||
): 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<T extends Id[]> = {
|
||||||
|
archetype: Archetype<T>,
|
||||||
|
row: number,
|
||||||
|
dense: number,
|
||||||
|
};
|
||||||
|
|
||||||
|
export function record<T extends Id[] = []>(world: World, entity: Entity): EntityRecord<T>;
|
||||||
|
|
Loading…
Reference in a new issue