Skip to content

Commit

Permalink
Fixes entity inheritance type issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
noahlange committed Feb 6, 2024
1 parent 2dd38c4 commit 2388537
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ecs/Entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export interface EntityComponents {
export interface EntityClass<T extends BaseType = {}, E extends Entity<T> = Entity<T>> {
data?: BaseDataType<T>;
new (context: Context, data?: BaseDataType<T>, tags?: string[]): E;
with<A extends ComponentClass[], T extends BaseType = {}>(...items: A): EntityClass<T & KeyedByType<A>>;
with<A extends ComponentClass[]>(...items: A): EntityClass<T & KeyedByType<A>>;
}

export class Entity<T extends BaseType = {}> {
Expand Down

0 comments on commit 2388537

Please sign in to comment.