ecspresso
    Preparing search index...

    Type Alias QueryDefinition<ComponentTypes, WithComponents, WithoutComponents, OptionalComponents, MutatesComponents>

    Simplified query definition type for creating reusable queries

    type QueryDefinition<
        ComponentTypes extends Record<string, any>,
        WithComponents extends keyof ComponentTypes = keyof ComponentTypes,
        WithoutComponents extends keyof ComponentTypes = keyof ComponentTypes,
        OptionalComponents extends keyof ComponentTypes = keyof ComponentTypes,
        MutatesComponents extends keyof ComponentTypes = keyof ComponentTypes,
    > = {
        changed?: ReadonlyArray<WithComponents>;
        mutates?: ReadonlyArray<MutatesComponents>;
        optional?: ReadonlyArray<OptionalComponents>;
        parentHas?: ReadonlyArray<keyof ComponentTypes>;
        with: ReadonlyArray<WithComponents>;
        without?: ReadonlyArray<WithoutComponents>;
    }

    Type Parameters

    Index

    Properties

    changed?: ReadonlyArray<WithComponents>
    mutates?: ReadonlyArray<MutatesComponents>

    Components to auto-mark as changed on every iterated entity after process() returns. Components in with but absent from mutates are narrowed to Readonly<T> on the iteration entity type.

    optional?: ReadonlyArray<OptionalComponents>
    parentHas?: ReadonlyArray<keyof ComponentTypes>
    with: ReadonlyArray<WithComponents>
    without?: ReadonlyArray<WithoutComponents>