Skip to content

Commit

Permalink
update typescript junk
Browse files Browse the repository at this point in the history
  • Loading branch information
mreinstein committed Jul 20, 2023
1 parent eb6b61a commit c93f4eb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
12 changes: 12 additions & 0 deletions types/ecs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,17 @@ export function removeEntity(world: World, entity: Entity, deferredRemoval?: boo
* @returns {Entity[]} an array of entities that match the given filters
*/
export function getEntities(world: World, componentNames: string[], listenerType?: ListenerType, listenerEntities?: ListenerResult): Entity[];
/**
* Get one entity from the world with all provided components. Optionally,
* @param {World} world
* @param {string[]} componentNames A component filter used to match entities.
* Must match all of the components in the filter.
* Can add an exclamation mark at the beginning to query by components that are not present. For example:
* `const e = ECS.getEntity(world, [ 'transform', '!hero' ])`
*
* @returns {Entity|void} one entity that matches the given filters or undefined if none match
*/
export function getEntity(world: World, componentNames: string[]): Entity | void;
/**
* Adds a system to the world.
* @param {World} world
Expand Down Expand Up @@ -183,6 +194,7 @@ declare namespace _default {
export { addComponentToEntity };
export { removeComponentFromEntity };
export { getEntities };
export { getEntity };
export { removeEntity };
export { addSystem };
export { preFixedUpdate };
Expand Down
2 changes: 1 addition & 1 deletion types/ecs.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c93f4eb

Please sign in to comment.