Skip to content

Commit

Permalink
Fixes #41
Browse files Browse the repository at this point in the history
ListenerResult was missing from the JSDoc type defs in ecs.js, so it never made it into ecs.d.ts, which prevents the project from building with TypeScript
  • Loading branch information
nrkn committed Feb 29, 2024
1 parent 6297622 commit 588d136
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ecs.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ const now = (typeof performance === 'undefined') ? (() => Date.now()) : (() => p
* @typedef { 'added' | 'removed' } ListenerType
*/

/**
* @typedef { Entity[] } ListenerResult
*/

/**
* @typedef { any } Component
*/
Expand Down
4 changes: 4 additions & 0 deletions types/ecs.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
/**
* @typedef { 'added' | 'removed' } ListenerType
*/
/**
* @typedef { Entity[] } ListenerResult
*/
/**
* @typedef { any } Component
*/
Expand Down Expand Up @@ -211,6 +214,7 @@ declare namespace _default {
}
export default _default;
export type ListenerType = 'added' | 'removed';
export type ListenerResult = Entity[];
export type Component = any;
export type Entity = {
[key: string]: any;
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 588d136

Please sign in to comment.