mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-30 18:43:21 +08:00
Merge pull request #4421 from borisyankov/basarat-patch-1
feat(ace) specialize 'change'
This commit is contained in:
12
ace/ace.d.ts
vendored
12
ace/ace.d.ts
vendored
@@ -1034,9 +1034,10 @@ declare module AceAjax {
|
||||
* Event sessions dealing with the mouse and keyboard are bubbled up from `Document` to the `Editor`, which decides what to do with them.
|
||||
**/
|
||||
export interface Editor {
|
||||
|
||||
addEventListener(ev: string, callback: Function);
|
||||
|
||||
addEventListener(ev: 'change', callback: (ev: EditorChangeEvent) => any);
|
||||
addEventListener(ev: string, callback: Function);
|
||||
|
||||
inMultiSelectMode: boolean;
|
||||
|
||||
selectMoreLines(n: number);
|
||||
@@ -1712,6 +1713,13 @@ declare module AceAjax {
|
||||
**/
|
||||
new(renderer: VirtualRenderer, session?: IEditSession): Editor;
|
||||
}
|
||||
|
||||
interface EditorChangeEvent {
|
||||
start: Position;
|
||||
end: Position;
|
||||
action: string; // insert, remove
|
||||
lines: any[];
|
||||
}
|
||||
|
||||
////////////////////////////////
|
||||
/// PlaceHolder
|
||||
|
||||
Reference in New Issue
Block a user