Skip to content

Commit e332186

Browse files
Copilotcodehz
andcommitted
Fix TypeScript type errors for ComponentId
Co-authored-by: codehz <13158903+codehz@users.noreply.github.com>
1 parent 88c3f3d commit e332186

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/world.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ export class World<UpdateParams extends any[] = []> {
520520

521521
// Separate regular components from wildcard relations
522522
const regularComponents: EntityId<any>[] = [];
523-
const wildcardRelations: { componentId: EntityId<any>; relationId: EntityId<any> }[] = [];
523+
const wildcardRelations: { componentId: ComponentId<any>; relationId: EntityId<any> }[] = [];
524524

525525
for (const componentType of componentTypes) {
526526
const detailedType = getDetailedIdType(componentType);
@@ -733,7 +733,7 @@ export class World<UpdateParams extends any[] = []> {
733733
private removeExclusiveRelations(
734734
entityId: EntityId,
735735
currentArchetype: Archetype,
736-
baseComponentId: EntityId<any>,
736+
baseComponentId: ComponentId<any>,
737737
changeset: ComponentChangeset,
738738
): void {
739739
// Check archetype components
@@ -758,7 +758,7 @@ export class World<UpdateParams extends any[] = []> {
758758
/**
759759
* Check if a component type is a relation with the given base component
760760
*/
761-
private isRelationWithComponent(componentType: EntityId<any>, baseComponentId: EntityId<any>): boolean {
761+
private isRelationWithComponent(componentType: EntityId<any>, baseComponentId: ComponentId<any>): boolean {
762762
const detailedType = getDetailedIdType(componentType);
763763
return (
764764
(detailedType.type === "entity-relation" || detailedType.type === "component-relation") &&
@@ -822,7 +822,7 @@ export class World<UpdateParams extends any[] = []> {
822822
private removeWildcardRelations(
823823
entityId: EntityId,
824824
currentArchetype: Archetype,
825-
baseComponentId: EntityId<any>,
825+
baseComponentId: ComponentId<any>,
826826
changeset: ComponentChangeset,
827827
): void {
828828
// Check archetype components

0 commit comments

Comments
 (0)