Rename event emitter to emitter

This commit is contained in:
MrKBear 2021-12-31 13:53:26 +08:00
parent 98f4236c35
commit 0fc0fa932a
4 changed files with 6 additions and 6 deletions

View File

@ -1,4 +1,4 @@
import { EventEmitter } from "./EventEmitter";
import { Emitter } from "./Emitter";
import { Logger, LogLabel, LevelLogLabel, colorRadio, StatusLabel } from "./Logger";
interface IAppAPIParam {
api: {
@ -118,7 +118,7 @@ type IAPIEvent<I extends IAnyData, O extends IAnyData> = {
/**
*
*/
class API<I extends IAnyData, O extends IAnyData> extends EventEmitter<IAPIEvent<I, O>> {
class API<I extends IAnyData, O extends IAnyData> extends Emitter<IAPIEvent<I, O>> {
/**
* URL

View File

@ -22,7 +22,7 @@ type GenericEventHandler<Events extends Record<EventType, unknown>> =
| Handler<Events[keyof Events]>
| WildcardHandler<Events>;
export class EventEmitter<Events extends Record<EventType, unknown>> {
export class Emitter<Events extends Record<EventType, unknown>> {
/**
* A Map of event names to registered handler functions.

View File

@ -782,7 +782,7 @@ class StatusLabel {
*
*/
static readonly Failed = new LogLabel(
"×", new LogStyle().setBlank("0 4px").setBorder("1000px", "1px solid red").setColor("red")
"x", new LogStyle().setBlank("0 4px").setBorder("1000px", "1px solid red").setColor("red")
);
}

View File

@ -1,4 +1,4 @@
import { EventEmitter, EventType } from "./EventEmitter";
import { Emitter, EventType } from "./Emitter";
import { Logger, LogLabel, LogStyle, LevelLogLabel } from "./Logger";
/**
@ -62,7 +62,7 @@ class Modular<
DEP extends Depends<M> = Depends<M>,
E extends Record<EventType, unknown> = Record<EventType, unknown>,
TD extends IAnyTypeObject = IAnyTypeObject>
extends EventEmitter<E>
extends Emitter<E>
implements WXContext<TD, IAnyTypeObject> {
// [x:string]: any;