improve atom/atom.d.ts and others. add status-bar/status-bar.d.ts.

This commit is contained in:
vvakame
2014-05-10 22:56:58 +09:00
committed by AdaskoTheBeAsT
parent 34d745c531
commit 1a9fbf4e1e
6 changed files with 51 additions and 3 deletions

View File

@@ -272,6 +272,7 @@ All definitions files include a header with the author and editors, so at some p
* [SockJS](https://github.com/sockjs/sockjs-client) (by [Emil Ivanov](https://github.com/vladev))
* [SoundJS](http://www.createjs.com/#!/SoundJS) (by [Pedro Ferreira](https://bitbucket.org/drk4))
* [Spin](http://fgnass.github.com/spin.js/) (by [Boris Yankov](https://github.com/borisyankov))
* [status-bar](https://github.com/atom/status-bar) (by [vvakame](https://github.com/vvakame))
* [stripe](https://stripe.com/) (by [Eric J. Smith](https://github.com/ejsmith/))
* [Store.js](https://github.com/marcuswestin/store.js/) (by [Vincent Bortone](https://github.com/vbortone))
* [Sugar](http://sugarjs.com/) (by [Josh Baldwin](https://github.com/jbaldwin/))

5
atom/atom.d.ts vendored
View File

@@ -8,6 +8,7 @@
/// <reference path="../space-pen/space-pen.d.ts" />
/// <reference path="../emissary/emissary.d.ts" />
/// <reference path="../text-buffer/text-buffer.d.ts" />
/// <reference path="../status-bar/status-bar.d.ts" />
// Policy: this definition file only declare element related to `atom`.
// if js file include to another npm package (e.g. "space-pen", "mixto" and "emissary").
@@ -87,6 +88,8 @@ declare module AtomCore {
command(eventName:string, selector:Function, handler:Function):any;
command(eventName:string, options:any, handler:Function):any;
command(eventName:string, selector:Function, options:any, handler:Function):any;
statusBar:StatusBar.IStatusBarView;
}
interface IPanes {
@@ -661,7 +664,7 @@ declare module AtomCore {
getSelectionsOrderedByBufferPosition():ISelection[];
getLastSelectionInBuffer():ISelection;
selectionIntersectsBufferRange(bufferRange:any):any;
setCursorScreenPosition(position:any, options:any):any;
setCursorScreenPosition(position:any, options?:any):any;
getCursorScreenPosition():TextBuffer.IPoint;
getCursorScreenRow():number;
setCursorBufferPosition(position:any, options:any):any;

View File

@@ -586,7 +586,11 @@ declare module "space-pen" {
end():any;
command(commandName:any, selector:any, options:any, handler:any):any;
command(eventName:string, handler:any):any;
command(eventName:string, selector:any, handler:any):any;
command(eventName:string, selector:any, options:any, handler:any):any;
preempt(eventName:any, handler:any):any;
}

View File

@@ -0,0 +1,8 @@
/// <reference path="./status-bar.d.ts" />
declare var StatusBarView:StatusBar.IStatusBarViewStatic;
StatusBarView.content();
var statusBar = new StatusBarView();
statusBar.appendLeft(new View());

32
status-bar/status-bar.d.ts vendored Normal file
View File

@@ -0,0 +1,32 @@
// Type definitions for status-bar
// Project: https://github.com/atom/status-bar
// Definitions by: vvakame <https://github.com/vvakame/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/// <reference path="../space-pen/space-pen.d.ts" />
/// <reference path="../text-buffer/text-buffer.d.ts" />
declare module StatusBar {
interface IStatusBarViewStatic {
content():any;
new(...args:any[]):IStatusBarView;
}
interface IStatusBarView extends View {
initialize():any;
attach():any;
destroy():any;
appendLeft(view:View):any;
prependLeft(view:View):any;
appendRight(view:View):any;
prependRight(view:View):any;
getActiveBuffer():TextBuffer.ITextBuffer;
getActiveItem():any;
storeActiveBuffer():TextBuffer.ITextBuffer;
subscribeToBuffer(event:string, callback:Function):any;
subscribeAllToBuffer():any[];
unsubscribeAllFromBuffer():any[];
}
}

View File

@@ -1,4 +1,4 @@
// Type definitions for Atom
// Type definitions for text-buffer
// Project: https://github.com/atom/text-buffer
// Definitions by: vvakame <https://github.com/vvakame/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped