diff --git a/package.json b/package.json index 33ee8a8..71bb525 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "oni-api", - "version": "0.0.31", + "version": "0.0.32", "description": "Oni's API layer", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/index.ts b/src/index.ts index 9f17c6f..f055647 100644 --- a/src/index.ts +++ b/src/index.ts @@ -91,8 +91,29 @@ export interface IWindowSplit { } export interface EditorManager { - allEditors: Editor + + /** + * An array of all available `Editor` instances + */ + allEditors: Editor[] + + /** + * A proxy that _always_ points to the active `Editor`. This means + * you can avoid always needing to hook/unhook events when the + * active `Editor` changes by hooking events on `anyEditor` + */ + anyEditor: Editor + + /** + * The currently active `Editor` instance + */ activeEditor: Editor + + /** + * Event that is dispatched when the active `Editor` changes, + * for example, when focus moves from one `Editor` to another. + */ + onActiveEditorChanged: IEvent } export interface InputManager {