has<T> method

bool has<T>()

Checks whether a dependency of type T is registered in this container, its overrides, or any ancestor parent container.

Implementation

bool has<T>() =>
    _overrides.containsKey(T) ||
    _bindings.containsKey(T) ||
    (parent?.has<T>() ?? false);