Skip to content
This repository has been archived by the owner on Dec 13, 2018. It is now read-only.

Commit

Permalink
Add missing atom.flow definitions
Browse files Browse the repository at this point in the history
Reviewed By: captbaritone

Differential Revision: D13329552

fbshipit-source-id: 7f8bcbf0642b9ad24d617f1e8adb4c3f6ca8a3bc
  • Loading branch information
Will Binns-Smith authored and facebook-github-bot committed Dec 6, 2018
1 parent 728dfc4 commit 38e4ab0
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion flow-libs/atom.js.flow
Expand Up @@ -535,6 +535,7 @@ declare class atom$Pane {
setActiveItem(item: Object): Object,
setFlexScale(flexScale: number): number,
getContainer(): atom$PaneContainer,
getActiveEditor(): ?atom$TextEditor,

element: HTMLElement,
}
Expand Down Expand Up @@ -652,12 +653,19 @@ declare class atom$Range {
object: atom$RangeLike,
copy?: boolean,
): atom$Range,
static fromPointWithDelta(
startPoint: atom$PointLike,
rowDelta: number,
columnDelta: number
): atom$Range,

constructor(pointA: atom$PointLike, pointB: atom$PointLike): void,
compare(other: atom$Range): number,
start: atom$Point,
end: atom$Point,
isEmpty(): boolean,
isEqual(otherRange: atom$RangeLike): boolean,
isSingleLine(): boolean,
intersectsWith(otherRange: atom$RangeLike, exclusive?: boolean): boolean,
containsPoint(point: atom$PointLike, exclusive?: boolean): boolean,
containsRange(other: atom$Range, exclusive?: boolean): boolean,
Expand Down Expand Up @@ -857,6 +865,7 @@ declare class atom$TextEditor extends atom$Model {
onDidChangeSoftWrapped(callback: (softWrapped: boolean) => mixed): IDisposable,
onDidChangeSelectionRange(callback: (event: atom$ChangeSelectionRangeEvent) => mixed): IDisposable,
observeSelections(callback: (selection: atom$Selection) => mixed): IDisposable,
onDidAddSelection(callback: (selection: atom$Selection) => mixed): IDisposable,

// File Details
getTitle: () => string,
Expand Down Expand Up @@ -936,6 +945,7 @@ declare class atom$TextEditor extends atom$Model {
getVisibleRowRange(): [number, number],
bufferRowForScreenRow(screenRow: number): number,
screenRangeForBufferRange(bufferRange: atom$RangeLike): atom$Range,
bufferRangeForBufferRow(bufferRow: number): atom$Range,

// Decorations
decorateMarker(marker: atom$Marker, decorationParams: DecorateMarkerParams): atom$Decoration,
Expand Down Expand Up @@ -986,6 +996,7 @@ declare class atom$TextEditor extends atom$Model {
unfoldBufferRow(bufferRow: number): void,

// Selections
getLastSelection(): atom$Selection,
getSelectedText(): string,
selectAll(): void,
getSelectedBufferRange(): atom$Range,
Expand Down Expand Up @@ -1027,7 +1038,7 @@ declare class atom$TextEditor extends atom$Model {
scan(
regex: RegExp,
iterator: (foundMatch: {
match: mixed,
match: RegExp$matchResult,
matchText: string,
range: atom$Range,
stop: () => mixed,
Expand Down Expand Up @@ -2226,6 +2237,7 @@ declare class atom$Selection {
undo?: boolean,
},
): string,
isEmpty(): boolean,
}

declare class atom$PanelContainer {
Expand Down

0 comments on commit 38e4ab0

Please sign in to comment.