mirror of
				https://github.com/Ukendio/jecs.git
				synced 2025-11-03 18:39:19 +00:00 
			
		
		
		
	fix types (#275)
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	
This commit is contained in:
		
							parent
							
								
									d8b2d36c52
								
							
						
					
					
						commit
						1eecaac96f
					
				
					 1 changed files with 4 additions and 12 deletions
				
			
		
							
								
								
									
										16
									
								
								jecs.luau
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								jecs.luau
									
									
									
									
									
								
							| 
						 | 
					@ -41,16 +41,8 @@ export type Iter<T...> = (query: Query<T...>) -> () -> (Entity, T...)
 | 
				
			||||||
export type Query<T...> = typeof(setmetatable(
 | 
					export type Query<T...> = typeof(setmetatable(
 | 
				
			||||||
	{} :: {
 | 
						{} :: {
 | 
				
			||||||
		iter: Iter<T...>,
 | 
							iter: Iter<T...>,
 | 
				
			||||||
		with: (<a>(Query<T...>, Id<a>) -> Query<T...>)
 | 
							with: ((Query<T...>, ...Id) -> Query<T...>),
 | 
				
			||||||
			& (<a, b>(Query<T...>, Id<a>, Id<b>) -> Query<T...>)
 | 
							without: ((Query<T...>, ...Id) -> Query<T...>),
 | 
				
			||||||
			& (<a, b, c>(Query<T...>, Id<a>, Id<b>, Id<c>) -> Query<T...>)
 | 
					 | 
				
			||||||
			& (<a, b, c>(Query<T...>, Id<a>, Id<b>, Id<c>) -> Query<T...>)
 | 
					 | 
				
			||||||
			& (<a, b, c, d>(Query<T...>, Id<a>, Id<b>, Id<c>, Id) -> Query<T...>),
 | 
					 | 
				
			||||||
		without: (<a>(Query<T...>, Id<a>) -> Query<T...>)
 | 
					 | 
				
			||||||
			& (<a, b>(Query<T...>, Id<a>, Id<b>) -> Query<T...>)
 | 
					 | 
				
			||||||
			& (<a, b, c>(Query<T...>, Id<a>, Id<b>, Id<c>) -> Query<T...>)
 | 
					 | 
				
			||||||
			& (<a, b, c>(Query<T...>, Id<a>, Id<b>, Id<c>) -> Query<T...>)
 | 
					 | 
				
			||||||
			& (<a, b, c, d>(Query<T...>, Id<a>, Id<b>, Id<c>, Id) -> Query<T...>),
 | 
					 | 
				
			||||||
		archetypes: (self: Query<T...>) -> { Archetype },
 | 
							archetypes: (self: Query<T...>) -> { Archetype },
 | 
				
			||||||
		cached: (self: Query<T...>) -> Query<T...>,
 | 
							cached: (self: Query<T...>) -> Query<T...>,
 | 
				
			||||||
		ids: { Id<any> },
 | 
							ids: { Id<any> },
 | 
				
			||||||
| 
						 | 
					@ -169,9 +161,9 @@ export type World = {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	observable: Map<Id, Map<Id, { Observer }>>,
 | 
						observable: Map<Id, Map<Id, { Observer }>>,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	added: <T>(World, Entity<T>, <e>(e: Entity<e>, id: Id<T>, value: T, oldarchetype: Archetype) -> ()) -> () -> (),
 | 
						added: <T>(World, Entity<T>, (e: Entity, id: Id<T>, value: T, oldarchetype: Archetype) -> ()) -> () -> (),
 | 
				
			||||||
	removed: <T>(World, Entity<T>, (e: Entity, id: Id<T>) -> ()) -> () -> (),
 | 
						removed: <T>(World, Entity<T>, (e: Entity, id: Id<T>) -> ()) -> () -> (),
 | 
				
			||||||
	changed:  <T>(World, Entity<T>, <e>(e: Entity<e>, id: Id<T>, value: T, oldarchetype: Archetype) -> ()) -> () -> (),
 | 
						changed:  <T>(World, Entity<T>, (e: Entity, id: Id<T>, value: T, oldarchetype: Archetype) -> ()) -> () -> (),
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	--- Enforce a check on entities to be created within desired range
 | 
						--- Enforce a check on entities to be created within desired range
 | 
				
			||||||
	range: (self: World, range_begin: number, range_end: number?) -> (),
 | 
						range: (self: World, range_begin: number, range_end: number?) -> (),
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue