Skip to content

ECS Framework API v2.2.13


ECS Framework API / Inject

Function: Inject()

Inject(serviceType): ParameterDecorator

Defined in: packages/core/src/Core/DI/Decorators.ts:145

@Inject() 装饰器

标记构造函数参数需要注入的服务类型

Parameters

serviceType

服务类型标识符

string | symbol | ServiceType<IService>

Returns

ParameterDecorator

Released under the MIT License.