Skip to content

Commit

Permalink
improve AtomCore.IPointStatic and AtomCore.IPoint definition in atom/…
Browse files Browse the repository at this point in the history
…atom.d.ts
  • Loading branch information
vvakame committed May 3, 2014
1 parent 9a8241a commit 3cdedd8
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions atom/atom.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -746,11 +746,49 @@ declare module AtomCore {
}

interface IPointStatic {
new(row:any, column:any):IPoint;
new (row?:number, column?:number):IPoint;

fromObject(point:IPoint, copy?:boolean):IPoint;
fromObject(object:number[]):IPoint;
fromObject(object:{row:number; col:number;}):IPoint;

min(point1:IPoint, point2:IPoint):IPoint;
min(point1:number[], point2:IPoint):IPoint;
min(point1:{row:number; col:number;}, point2:IPoint):IPoint;

min(point1:IPoint, point2:number[]):IPoint;
min(point1:number[], point2:number[]):IPoint;
min(point1:{row:number; col:number;}, point2:number[]):IPoint;

min(point1:IPoint, point2:{row:number; col:number;}):IPoint;
min(point1:number[], point2:{row:number; col:number;}):IPoint;
min(point1:{row:number; col:number;}, point2:{row:number; col:number;}):IPoint;
}

interface IPoint {
// TBD
row:number;
column:number;

copy():IPoint;
freeze():IPoint;

translate(delta:IPoint):IPoint;
translate(delta:number[]):IPoint;
translate(delta:{row:number; col:number;}):IPoint;

add(other:IPoint):IPoint;
add(other:number[]):IPoint;
add(other:{row:number; col:number;}):IPoint;

splitAt(column:number):IPoint[];
compare(other:IPoint):number;
isEqual(other:IPoint):boolean;
isLessThan(other:IPoint):boolean;
isLessThanOrEqual(other:IPoint):boolean;
isGreaterThan(other:IPoint):boolean;
isGreaterThanOrEqual(other:IPoint):boolean;
toArray():number[];
serialize():number[];
}

interface IRangeStatic {
Expand Down

0 comments on commit 3cdedd8

Please sign in to comment.