Skip to content

world.without: make component keys optional instead of omitting them #320

Open
@nbredikhin

Description

@nbredikhin

The current without implementation uses Omit for the entity type. However, Omit removes keys entirely from the output type, which makes it more difficult to check for components that might exist:

Image

It would make much more sense not to alter the entity type at all, or to enforce optionality of the omitted component keys.

Image

This might be useful when you add a component back within the query loop.

The type to be fixed: https://github.com/hmans/miniplex/blob/main/packages/core/src/core.ts#L14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions