added new type definitions for Atom 1.0 api CommandRegistry, Disposable and atom.commands property

This commit is contained in:
Vitalii Daniuk
2015-04-15 19:47:04 +07:00
parent ed38db403a
commit 4b49250d9a
+16
View File
@@ -1145,6 +1145,18 @@ declare module AtomCore {
new(state:IAtomState):IAtom;
}
class Disposable {
constructor(disposalAction:any)
dispose():void
}
class CommandRegistry {
add(target:string, commandName:string, callback:Function):Disposable
findCommands(params:Object):Object[]
dispatch(target:any,commandName:string):void
}
// https://atom.io/docs/api/v0.106.0/api/classes/Atom.html
/* Global Atom class : instance members */
interface IAtom {
@@ -1175,6 +1187,8 @@ declare module AtomCore {
workspace: IWorkspace;
// really exists? end
commands: CommandRegistry;
initialize:Function;
// registerRepresentationClass:Function;
// registerRepresentationClasses:Function;
@@ -1754,6 +1768,8 @@ declare module "atom" {
cancel():any;
}
var WorkspaceView:AtomCore.IWorkspaceViewStatic;
var Task:AtomCore.ITaskStatic;