Skip to content

Function: Injectable() ​

ts
function Injectable(): InjectableDecorator;

Defined in: src/wirestate-core/metadata/metadata-injectable.ts:44

Marks a class as eligible for Wirestate instance bindings.

Returns ​

InjectableDecorator

A class decorator registering the class as injectable.

Remarks ​

Instance bindings require the implementation class to be decorated with @Injectable(). The mark is stored on the exact class. Subclasses must be decorated separately when they are bound directly.

The decorator supports both TC39 standard decorators and legacy TypeScript decorators.

Throws ​

WirestateError If the decorator is applied to a non-class TC39 target.