Skip to content

Commit

Permalink
types(node): type EventEmitter in dist
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Aug 2, 2023
1 parent e7b93cb commit 0106e19
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/runtime/node/events/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
// https://nodejs.org/api/events.html
import type events from "node:events";
import type nodeEvents from "node:events";

// @ts-ignore
import { EventEmitter as _EventEmitter, once as _once } from "./_events";

export const EventEmitter = _EventEmitter as any as typeof events.EventEmitter;
export const once = _once as any as typeof events.once;
export const EventEmitter: typeof nodeEvents.EventEmitter =
_EventEmitter as any as typeof nodeEvents.EventEmitter;

export default <typeof events>{
export const once: typeof nodeEvents.once =
_once as any as typeof nodeEvents.once;

export default <typeof nodeEvents>{
EventEmitter,
once,
};

0 comments on commit 0106e19

Please sign in to comment.