@atlaskit/editor-common
Version:
A package that contains common classes and components for editor and renderer
15 lines (14 loc) • 738 B
TypeScript
/// <reference path="../../../../../../typings/events.d.ts" />
/// <reference types="node" />
/// <reference types="node/events" />
import { EventEmitter } from 'events';
export type UpdateEvent = 'create' | 'delete' | 'resolve' | 'unresolve' | 'setselectedannotation';
export type VisibilityEvent = 'setvisibility';
type AnnotationCallback = (params: string) => void;
type VisibilityCallback = (params: boolean) => void;
export declare class AnnotationUpdateEmitter extends EventEmitter {
on(event: VisibilityEvent, listener: (isVisible: boolean) => void): this;
on(event: UpdateEvent, listener: (annotationId: string) => void): this;
off(event: string, listener: AnnotationCallback | VisibilityCallback): this;
}
export {};