Front-End Component Manager Annotations API

Last modified by Manuel Leduc on 2026/05/12 15:27

Content

Reference

injectable()

function injectable(): ClassDecorator

Marks 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): ParameterDecorator

Injects a single dependency identified by id into a constructor parameter.

Parameters:

NameTypeDescription
idsymbolThe 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): ParameterDecorator

Selects a specific binding by name when several implementations are bound to the same role identifier.

Parameters:

NameTypeDescription
namestringThe 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): ParameterDecorator

Injects every component bound to the role id as an array.

Parameters:

NameTypeDescription
idsymbolThe role symbol of the bindings to collect.

Returns: A ParameterDecorator applied to a constructor parameter.

Get Connected