getComponent<T extends Object> method

T getComponent<T extends Object>()

Retrieves the component of type T associated with this entity.

Implementation

T getComponent<T extends Object>() =>
    _getDependencies().map((e) => e.value).whereType<T>().first;