mirror of
https://github.com/Ukendio/jecs.git
synced 2026-02-04 15:15:21 +00:00
more fixes
This commit is contained in:
parent
3ca059683c
commit
57ff16398a
1 changed files with 3 additions and 3 deletions
6
src/jecs.d.ts
vendored
6
src/jecs.d.ts
vendored
|
|
@ -36,8 +36,8 @@ export type InferComponent<E> = E extends Entity<infer D>
|
||||||
? D
|
? D
|
||||||
: E extends Pair<infer P, infer O>
|
: E extends Pair<infer P, infer O>
|
||||||
? P extends TagDiscriminator
|
? P extends TagDiscriminator
|
||||||
? O
|
? O
|
||||||
: P
|
: P
|
||||||
: never;
|
: never;
|
||||||
|
|
||||||
type FlattenTuple<T extends unknown[]> = T extends [infer U] ? U : LuaTuple<T>;
|
type FlattenTuple<T extends unknown[]> = T extends [infer U] ? U : LuaTuple<T>;
|
||||||
|
|
@ -178,7 +178,7 @@ export class World {
|
||||||
* @param entity The target entity.
|
* @param entity The target entity.
|
||||||
* @param component The component (or tag) to add.
|
* @param component The component (or tag) to add.
|
||||||
*/
|
*/
|
||||||
add<C>(entity: Entity, component: TagDiscriminator extends InferComponent<C> ? C : Id <TagDiscriminator>): void;
|
add<C>(entity: Entity, component: TagDiscriminator extends InferComponent<C> ? C : Id<TagDiscriminator>): void;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Installs a hook on the given component.
|
* Installs a hook on the given component.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue