Skip to content

Home > @esengine/ecs-framework-monorepo > AsyncEventHandler

AsyncEventHandler() function

异步事件装饰器工厂 用于自动注册异步事件监听器

Signature:

typescript
export declare function AsyncEventHandler(eventType: string, config?: IEventListenerConfig): (target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor;

Parameters

Parameter

Type

Description

eventType

string

config

IEventListenerConfig

(Optional)

Returns:

(target: any, propertyKey: string, descriptor: PropertyDescriptor) => PropertyDescriptor

基于 MIT 许可证发布