mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
added new type definitions for Atom 1.0 api CommandRegistry, Disposable and atom.commands property
This commit is contained in:
Vendored
+16
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user