operator [] method

T operator [](
  1. int entity
)

Fast but unsafe retrieval of a component for this entity. No bounding checks, so this could throw a RangeError, however in most scenarios you already know the entity possesses this component.

Implementation

T operator [](int entity) => _components[entity]!;