@proto-kit/commonDocs


Documentation / @proto-kit/common / implement

Function: implement()

implement<T>(name): (target) => void

Marks the class to implement a certain interface T, while also attaching a DI-injection alias as metadata, that will be picked up by the ModuleContainer to allow resolving by that interface name

Type Parameters

T

Parameters

name: string

The name of the injection alias, convention is to use the same as the name of T

Returns

Function

Parameters

target: TypedClass<T>

Check if the target class extends RuntimeModule, while also providing static config presets

Returns

void

Defined in

packages/common/src/config/injectAlias.ts:51