// Prefer the inline form:
const container = Container
.providesValue("values", [1])
.append("values", () => 2);
// ConcatInjectable is the lower-level primitive:
const container2 = Container
.providesValue("values", [1])
.provides(ConcatInjectable("values", () => 2));
// Both result in container.get("values") === [1, 2]
Creates an Injectable factory function with dependencies that appends a Service to an existing array of Services of the same type. This variant supports services that require other services to be instantiated, allowing for more complex setups.
Token identifying an existing Service array to append the new Service to.
Read-only list of Tokens for dependencies required by the factory function.
Factory function returning the Service to append. The types and number of its parameters must exactly match the dependencies.
Creates an Injectable factory function without dependencies that appends a Service to an existing array of Services of the same type. Useful for dynamically expanding service collections without altering original service tokens or factories.
Note: Prefer using
container.append('token', () => value)orcontainer.appendValue('token', value)instead.