Skip to content

ECS Framework API v2.1.50


ECS Framework API / EventTypeValidator

Class: EventTypeValidator

Defined in: ECS/CoreEvents.ts:142

事件类型验证器 验证事件类型是否有效

Constructors

Constructor

new EventTypeValidator(): EventTypeValidator

Returns

EventTypeValidator

Methods

isValid()

static isValid(eventType): boolean

Defined in: ECS/CoreEvents.ts:156

验证事件类型是否有效

Parameters

eventType

string

事件类型

Returns

boolean

是否有效


getAllValidTypes()

static getAllValidTypes(): string[]

Defined in: ECS/CoreEvents.ts:164

获取所有有效的事件类型

Returns

string[]

事件类型数组


addCustomType()

static addCustomType(eventType): void

Defined in: ECS/CoreEvents.ts:172

添加自定义事件类型

Parameters

eventType

string

事件类型

Returns

void


removeCustomType()

static removeCustomType(eventType): void

Defined in: ECS/CoreEvents.ts:180

移除自定义事件类型

Parameters

eventType

string

事件类型

Returns

void

Released under the MIT License.