mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-23 12:56:46 +08:00
improve atom/atom.d.ts and others. add status-bar/status-bar.d.ts.
This commit is contained in:
@@ -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
5
atom/atom.d.ts
vendored
@@ -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;
|
||||
|
||||
6
space-pen/space-pen.d.ts
vendored
6
space-pen/space-pen.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
8
status-bar/status-bar-tests.ts
Normal file
8
status-bar/status-bar-tests.ts
Normal 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
32
status-bar/status-bar.d.ts
vendored
Normal 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[];
|
||||
}
|
||||
}
|
||||
2
text-buffer/text-buffer.d.ts
vendored
2
text-buffer/text-buffer.d.ts
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user