mirror of
				https://github.com/Ukendio/jecs.git
				synced 2025-10-31 17:20:32 +00:00 
			
		
		
		
	Fix InferComponents types due to typo / misunderstanding
This commit is contained in:
		
							parent
							
								
									54022b36d1
								
							
						
					
					
						commit
						a16ab18ec4
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		
							
								
								
									
										4
									
								
								lib/index.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										4
									
								
								lib/index.d.ts
									
									
									
									
										vendored
									
									
								
							|  | @ -46,14 +46,14 @@ type Record = { | |||
| 	componentRecord: ArchetypeMap, | ||||
| } | ||||
| 
 | ||||
| type Query<T extends Entity[]> = { | ||||
| type Query<T extends unknown[]> = { | ||||
|     without: (...components: Entity[]) => Query<T>; | ||||
| } & IterableFunction<LuaTuple<[Entity, ...T]>> | ||||
| 
 | ||||
| // Utility Types
 | ||||
| export type Entity<T = unknown> = number & { __nominal_type_dont_use: T } | ||||
| export type EntityType<T> = T extends Entity<infer A> ? A : never; | ||||
| export type InferComponents<A extends Entity[]> = A & { | ||||
| export type InferComponents<A extends Entity[]> = { | ||||
|     [K in keyof A]: EntityType<A[K]> | ||||
| }; | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
		Reference in a new issue