UNPKG

aws-crt

Version:

NodeJS bindings to the aws-c-* libraries

19 lines (18 loc) 629 B
/// <reference types="node" /> import { EventEmitter } from 'events'; declare type EventKey = string | symbol; /** * Provides buffered event emitting semantics, similar to many Node-style streams. * Subclasses will override {@link BufferedEventEmitter#on} and trigger uncorking. * Note that uncorking should always be done next tick, not during the on() call! */ export declare class BufferedEventEmitter extends EventEmitter { private corked; private eventQueue?; private lastQueuedEvent?; constructor(); cork(): void; uncork(): void; emit(event: EventKey, ...args: any[]): boolean; } export {};