Skip to content

Commit

Permalink
fix: Allow components with args
Browse files Browse the repository at this point in the history
  • Loading branch information
eonarheim committed Oct 3, 2021
1 parent 6b72b4c commit 2807104
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/engine/EntityComponentSystem/Component.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { Entity } from './Entity';

export interface ComponentCtor<T extends Component = Component> {
new (): T;
}
/**
* Component Contructor Types
*/
export declare type ComponentCtor<T extends Component = Component> = new (...args:any[]) => T;

/**
* Type guard to check if a component implements clone
Expand Down

0 comments on commit 2807104

Please sign in to comment.