Front-End Component Manager Annotations API
Last modified by Manuel Leduc on 2026/05/12 15:27
Content
Reference
injectable()
function injectable(): ClassDecoratorMarks a class as eligible for instantiation by the component container.
Returns: A ClassDecorator that registers the target class with Inversify metadata.
inject(id)
function inject(id: symbol): ParameterDecoratorInjects a single dependency identified by id into a constructor parameter.
Parameters:
| Name | Type | Description |
|---|---|---|
| id | symbol | The role symbol identifying the dependency to inject. |
Returns: A ParameterDecorator applied to a constructor parameter.
Notes:
- If multiple bindings exist for id, combine with @named to disambiguate, or use @injectAll to receive all of them.
named(name)
function named(name: string): ParameterDecoratorSelects a specific binding by name when several implementations are bound to the same role identifier.
Parameters:
| Name | Type | Description |
|---|---|---|
| name | string | The binding name to match. |
Returns: A ParameterDecorator applied to a constructor parameter.
Notes:
- Typically composed with @inject(role) on the same parameter.
injectAll(id)
function injectAll(id: symbol): ParameterDecoratorInjects every component bound to the role id as an array.
Parameters:
| Name | Type | Description |
|---|---|---|
| id | symbol | The role symbol of the bindings to collect. |
Returns: A ParameterDecorator applied to a constructor parameter.