mirror of
				https://github.com/Ukendio/jecs.git
				synced 2025-11-04 02:49:18 +00:00 
			
		
		
		
	Allow tags in bulk_insert (#269)
This commit is contained in:
		
							parent
							
								
									2d9432ab7a
								
							
						
					
					
						commit
						a6c2d7152e
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		
							
								
								
									
										4
									
								
								jecs.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								jecs.d.ts
									
									
									
									
										vendored
									
									
								
							| 
						 | 
					@ -338,10 +338,12 @@ export type ComponentRecord = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
export function component_record(world: World, id: Id): 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[]>(
 | 
					export function bulk_insert<const C extends Id[]>(
 | 
				
			||||||
	world: World,
 | 
						world: World,
 | 
				
			||||||
	entity: Entity,
 | 
						entity: Entity,
 | 
				
			||||||
	ids: C,
 | 
						ids: C,
 | 
				
			||||||
	values: InferComponents<C>,
 | 
						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;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue