Allow tags in bulk_insert (#269)

This commit is contained in:
dai 2025-08-20 22:30:43 +02:00 committed by GitHub
parent 2d9432ab7a
commit a6c2d7152e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

4
jecs.d.ts vendored
View file

@ -338,10 +338,12 @@ export type ComponentRecord = {
export function component_record(world: World, id: Id): ComponentRecord;
type TagToUndefined<T> = T extends TagDiscriminator ? undefined : T
export function bulk_insert<const C extends Id[]>(
world: World,
entity: Entity,
ids: C,
values: InferComponents<C>,
values: { [K in keyof C]: TagToUndefined<InferComponent<C[K]>> },
): void;
export function bulk_remove(world: World, entity: Entity, ids: Id[]): void;