Provider that creates an alias to an existing token
When the provide token is resolved, the container resolves useExisting instead.
Both tokens return the same instance (for singleton/request-scoped services).
Use cases:
Creating interface tokens that alias concrete implementations
Provider that creates an alias to an existing token
When the
providetoken is resolved, the container resolvesuseExistinginstead. Both tokens return the same instance (for singleton/request-scoped services).Use cases:
Example: Basic alias
Example: Interface abstraction