mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 21:10:23 +00:00
Add atom.d.ts from atom-typescript project
This commit is contained in:
Vendored
+130
-152
@@ -15,7 +15,7 @@
|
||||
// if js file include to another npm package (e.g. "space-pen", "mixto" and "emissary").
|
||||
// you should create a separate file.
|
||||
|
||||
// API documentation : https://atom.io/docs/api/v0.106.0/api/docs/README.md.html
|
||||
// NOTE Document? You should use DevTools hehe...
|
||||
|
||||
interface Window {
|
||||
atom: AtomCore.IAtom;
|
||||
@@ -32,9 +32,36 @@ declare module AtomCore {
|
||||
version: number;
|
||||
configDefaults:any;
|
||||
content():any;
|
||||
}
|
||||
|
||||
interface Disposable {
|
||||
dispose();
|
||||
}
|
||||
|
||||
interface Decoration
|
||||
{
|
||||
destroy(): void;
|
||||
}
|
||||
|
||||
interface IWorkspaceView extends View {
|
||||
/**
|
||||
* Represents a buffer annotation that remains logically stationary even as the buffer changes. This is used
|
||||
* to represent cursors, folds, snippet targets, misspelled words, any anything else that needs to track a
|
||||
* logical location in the buffer over time.
|
||||
*/
|
||||
interface Marker {
|
||||
/**
|
||||
* Destroys the marker, causing it to emit the 'destroyed' event. Once destroyed, a marker cannot be
|
||||
* restored by undo/redo operations.
|
||||
*/
|
||||
destroy(): void;
|
||||
|
||||
/**
|
||||
* Gets the screen range of the display marker.
|
||||
*/
|
||||
getScreenRange(): Range;
|
||||
}
|
||||
|
||||
interface IWorkspaceView extends View {
|
||||
// Delegator.includeInto(WorkspaceView);
|
||||
|
||||
// delegate to model property's property
|
||||
@@ -141,9 +168,14 @@ declare module AtomCore {
|
||||
removeLineHighlights():void;
|
||||
addLineHighlight(row:number, emptySelection?:boolean):any;
|
||||
highlightLines():boolean;
|
||||
}
|
||||
}
|
||||
|
||||
interface ICommandPanel {
|
||||
interface ICommandRegistry {
|
||||
add(selector: string, name: string, callback: (event: any) => void); // selector:'atom-editor'|'atom-workspace'
|
||||
dispatch(selector: any, name:string);
|
||||
}
|
||||
|
||||
interface ICommandPanel {
|
||||
// TBD
|
||||
}
|
||||
|
||||
@@ -344,11 +376,20 @@ declare module AtomCore {
|
||||
foldForMarker(marker:any):any;
|
||||
}
|
||||
|
||||
interface IViewRegistry {
|
||||
getView(selector:any):any;
|
||||
}
|
||||
|
||||
interface ICursorStatic {
|
||||
new (arg:{editor:IEditor; marker:IDisplayBufferMarker; id: number;}):ICursor;
|
||||
}
|
||||
|
||||
interface ScopeDescriptor {
|
||||
scopes: string[];
|
||||
}
|
||||
|
||||
interface ICursor /* extends Theorist.Model */ {
|
||||
getScopeDescriptor(): ScopeDescriptor;
|
||||
screenPosition:any;
|
||||
bufferPosition:any;
|
||||
goalColumn:any;
|
||||
@@ -413,6 +454,7 @@ declare module AtomCore {
|
||||
isAtEndOfLine():boolean;
|
||||
getScopes():string[];
|
||||
hasPrecedingCharactersOnLine():boolean;
|
||||
getMarker(): Marker;
|
||||
}
|
||||
|
||||
interface ILanguageMode {
|
||||
@@ -497,35 +539,6 @@ declare module AtomCore {
|
||||
screenRangeChanged():any;
|
||||
}
|
||||
|
||||
interface IDecorationParams {
|
||||
id?: number;
|
||||
class: string;
|
||||
type: any /* string or string[] */;
|
||||
}
|
||||
|
||||
interface IDecorationStatic {
|
||||
isType(decorationParams:IDecorationParams, type:any /* string or string[] */):boolean;
|
||||
new (marker:IDisplayBufferMarker, displayBuffer:IDisplayBuffer, params: IDecorationParams): IDecoration;
|
||||
}
|
||||
|
||||
interface IDecoration extends Emissary.IEmitter {
|
||||
marker: IDisplayBufferMarker;
|
||||
displayBuffer: IDisplayBuffer;
|
||||
params: IDecorationParams
|
||||
id: number;
|
||||
flashQueue: any[];
|
||||
isDestroyed: boolean;
|
||||
|
||||
destroy():void;
|
||||
update(newParams:IDecorationParams):void;
|
||||
getMarker():IDisplayBufferMarker;
|
||||
getParams():IDecorationParams;
|
||||
isType(type:string):boolean;
|
||||
matchesPattern(decorationPattern:{[key:string]:IDecorationParams;}):boolean;
|
||||
flash(klass:string, duration?:number):void;
|
||||
consumeNextFlash():any;
|
||||
}
|
||||
|
||||
interface IEditor {
|
||||
// Serializable.includeInto(Editor);
|
||||
// Delegator.includeInto(Editor);
|
||||
@@ -538,8 +551,6 @@ declare module AtomCore {
|
||||
cursors:ICursor[];
|
||||
selections: ISelection[];
|
||||
suppressSelectionMerging:boolean;
|
||||
updateBatchDepth: number;
|
||||
selectionFlashDuration: number;
|
||||
softTabs: boolean;
|
||||
displayBuffer: IDisplayBuffer;
|
||||
|
||||
@@ -553,19 +564,20 @@ declare module AtomCore {
|
||||
subscriptionsByObject: any; /* WeakMap */
|
||||
subscriptions: Emissary.ISubscription[];
|
||||
|
||||
mini: any;
|
||||
|
||||
serializeParams():{id:number; softTabs:boolean; scrollTop:number; scrollLeft:number; displayBuffer:any;};
|
||||
deserializeParams(params:any):any;
|
||||
subscribeToBuffer():void;
|
||||
subscribeToDisplayBuffer():void;
|
||||
getViewClass():any; // return type are EditorView
|
||||
destroyed():void;
|
||||
isDestroyed():boolean;
|
||||
copy():IEditor;
|
||||
getTitle():string;
|
||||
getLongTitle():string;
|
||||
setVisible(visible:boolean):void;
|
||||
setMini(mini:any):void;
|
||||
setScrollTop(scrollTop:any):void;
|
||||
getScrollTop():number;
|
||||
setScrollLeft(scrollLeft:any):void;
|
||||
getScrollLeft():number;
|
||||
setEditorWidthInChars(editorWidthInChars:any):void;
|
||||
getSoftWrapColumn():number;
|
||||
getSoftTabs():boolean;
|
||||
@@ -575,7 +587,6 @@ declare module AtomCore {
|
||||
getTabText():string;
|
||||
getTabLength():number;
|
||||
setTabLength(tabLength:any):void;
|
||||
usesSoftTabs():boolean;
|
||||
clipBufferPosition(bufferPosition:any):void;
|
||||
clipBufferRange(range:any):void;
|
||||
indentationForBufferRow(bufferRow:any):void;
|
||||
@@ -584,7 +595,6 @@ declare module AtomCore {
|
||||
buildIndentString(number:any):string;
|
||||
save():void;
|
||||
saveAs(filePath:any):void;
|
||||
copyPathToClipboard():void;
|
||||
getPath():string;
|
||||
getText():string;
|
||||
setText(text:any):void;
|
||||
@@ -604,7 +614,6 @@ declare module AtomCore {
|
||||
scanInBufferRange():any;
|
||||
backwardsScanInBufferRange():any;
|
||||
isModified():boolean;
|
||||
isEmpty():boolean;
|
||||
shouldPromptToSave():boolean;
|
||||
screenPositionForBufferPosition(bufferPosition:any, options?:any):TextBuffer.IPoint;
|
||||
bufferPositionForScreenPosition(screenPosition:any, options?:any):TextBuffer.IPoint;
|
||||
@@ -621,20 +630,15 @@ declare module AtomCore {
|
||||
scopesForBufferPosition(bufferPosition:any):string[];
|
||||
bufferRangeForScopeAtCursor(selector:string):any;
|
||||
tokenForBufferPosition(bufferPosition:any):IToken;
|
||||
getCursorScopes():string[];
|
||||
logCursorScope():void;
|
||||
insertText(text:string, options?:any):TextBuffer.IRange[];
|
||||
insertNewline():TextBuffer.IRange[];
|
||||
insertNewlineBelow():TextBuffer.IRange[];
|
||||
insertNewlineAbove():any;
|
||||
indent(options?:any):any;
|
||||
backspace():any[];
|
||||
// deprecated backspaceToBeginningOfWord():any[];
|
||||
// deprecated backspaceToBeginningOfLine():any[];
|
||||
deleteToBeginningOfWord():any[];
|
||||
deleteToBeginningOfLine():any[];
|
||||
backspaceToBeginningOfWord():any[];
|
||||
backspaceToBeginningOfLine():any[];
|
||||
delete():any[];
|
||||
deleteToEndOfLine():any[];
|
||||
deleteToEndOfWord():any[];
|
||||
deleteLine():TextBuffer.IRange[];
|
||||
indentSelectedRows():TextBuffer.IRange[][];
|
||||
@@ -657,7 +661,6 @@ declare module AtomCore {
|
||||
foldBufferRow(bufferRow:any):any;
|
||||
unfoldBufferRow(bufferRow:any):any;
|
||||
isFoldableAtBufferRow(bufferRow:any):boolean;
|
||||
isFoldableAtScreenRow(screenRow:any):boolean;
|
||||
createFold(startRow:any, endRow:any):IFold;
|
||||
destroyFoldWithId(id:any):any;
|
||||
destroyFoldsIntersectingBufferRange(bufferRange:any):any;
|
||||
@@ -671,12 +674,9 @@ declare module AtomCore {
|
||||
moveLineUp():ISelection[];
|
||||
moveLineDown():ISelection[];
|
||||
duplicateLines():any[][];
|
||||
// duprecated duplicateLine():any[][];
|
||||
duplicateLine():any[][];
|
||||
mutateSelectedText(fn:(selection:ISelection)=>any):any;
|
||||
replaceSelectedText(options:any, fn:(selection:string)=>any):any;
|
||||
decorationsForScreenRowRange(startScreenRow:any, endScreenRow:any):{[id:number]: IDecoration[]};
|
||||
decorateMarker(marker:IDisplayBufferMarker, decorationParams: {type:string; class: string;}):IDecoration;
|
||||
decorationForId(id:number):IDecoration;
|
||||
getMarker(id:number):IDisplayBufferMarker;
|
||||
getMarkers():IDisplayBufferMarker[];
|
||||
findMarkers(...args:any[]):IDisplayBufferMarker[];
|
||||
@@ -688,7 +688,6 @@ declare module AtomCore {
|
||||
getMarkerCount():number;
|
||||
hasMultipleCursors():boolean;
|
||||
getCursors():ICursor[];
|
||||
getCursor():ICursor;
|
||||
addCursorAtScreenPosition(screenPosition:any):ICursor;
|
||||
addCursorAtBufferPosition(bufferPosition:any):ICursor;
|
||||
addCursor(marker:any):ICursor;
|
||||
@@ -700,7 +699,6 @@ declare module AtomCore {
|
||||
removeSelection(selection:ISelection):any;
|
||||
clearSelections():boolean;
|
||||
consolidateSelections():boolean;
|
||||
selectionScreenRangeChanged(selection:any):void;
|
||||
getSelections():ISelection[];
|
||||
getSelection(index?:number):ISelection;
|
||||
getLastSelection():ISelection;
|
||||
@@ -717,7 +715,7 @@ declare module AtomCore {
|
||||
getSelectedBufferRanges():TextBuffer.IRange[];
|
||||
getSelectedText():string;
|
||||
getTextInBufferRange(range:TextBuffer.IRange):string;
|
||||
setTextInBufferRange(range:TextBuffer.IRange, text:string):any;
|
||||
setTextInBufferRange(range:TextBuffer.IRange | any[], text:string):any;
|
||||
getCurrentParagraphBufferRange():TextBuffer.IRange;
|
||||
getWordUnderCursor(options?:any):string;
|
||||
moveCursorUp(lineCount?:number):void;
|
||||
@@ -729,23 +727,16 @@ declare module AtomCore {
|
||||
moveCursorToBeginningOfScreenLine():void;
|
||||
moveCursorToBeginningOfLine():void;
|
||||
moveCursorToFirstCharacterOfLine():void;
|
||||
moveCursorToEndOfScreenLine():void;
|
||||
moveToEndOfScreenLine():void;
|
||||
moveCursorToEndOfLine():void;
|
||||
moveCursorToBeginningOfWord():void;
|
||||
moveCursorToEndOfWord():void;
|
||||
moveCursorToBeginningOfNextWord():void;
|
||||
moveCursorToPreviousWordBoundary():void;
|
||||
moveCursorToNextWordBoundary():void;
|
||||
moveCursorToBeginningOfNextParagraph():void;
|
||||
moveCursorToBeginningOfPreviousParagraph():void;
|
||||
scrollToCursorPosition(options:any):any;
|
||||
pageUp():void;
|
||||
pageDown():void;
|
||||
selectPageUp():void;
|
||||
selectPageDown():void;
|
||||
getRowsPerPage():number;
|
||||
moveCursors(fn:(cursor:ICursor)=>any):any;
|
||||
cursorMoved(event:any):void;
|
||||
moveToBeginningOfLine():any;
|
||||
moveToEndOfLine():any;
|
||||
selectToScreenPosition(position:TextBuffer.IPoint):any;
|
||||
selectRight():ISelection[];
|
||||
selectLeft():ISelection[];
|
||||
@@ -760,6 +751,7 @@ declare module AtomCore {
|
||||
selectToPreviousWordBoundary():ISelection[];
|
||||
selectToNextWordBoundary():ISelection[];
|
||||
selectLine():ISelection[];
|
||||
selectLinesContainingCursors():ISelection[];
|
||||
addSelectionBelow():ISelection[];
|
||||
addSelectionAbove():ISelection[];
|
||||
splitSelectionsIntoLines():any[];
|
||||
@@ -771,8 +763,6 @@ declare module AtomCore {
|
||||
selectToEndOfWord():ISelection[];
|
||||
selectToBeginningOfNextWord():ISelection[];
|
||||
selectWord():ISelection[];
|
||||
selectToBeginningOfNextParagraph():ISelection[];
|
||||
selectToBeginningOfPreviousParagraph():ISelection[];
|
||||
selectMarker(marker:any):any;
|
||||
mergeCursors():number[];
|
||||
expandSelectionsForward():any;
|
||||
@@ -784,71 +774,39 @@ declare module AtomCore {
|
||||
setGrammar(grammer:IGrammar):void;
|
||||
reloadGrammar():any;
|
||||
shouldAutoIndent():boolean;
|
||||
shouldShowInvisibles():boolean;
|
||||
updateInvisibles():void;
|
||||
transact(fn:Function):any;
|
||||
beginTransaction():ITransaction;
|
||||
commitTransaction():any;
|
||||
abortTransaction():any[];
|
||||
inspect():string;
|
||||
logScreenLines(start:number, end:number):any[];
|
||||
handleTokenization():void;
|
||||
handleGrammarChange():void;
|
||||
handleMarkerCreated(marker:any):any;
|
||||
getSelectionMarkerAttributes():{type: string; editorId: number; invalidate: string; };
|
||||
getVerticalScrollMargin():number;
|
||||
setVerticalScrollMargin(verticalScrollMargin:number):void;
|
||||
getHorizontalScrollMargin():number;
|
||||
setHorizontalScrollMargin(horizontalScrollMargin:number):void;
|
||||
getLineHeightInPixels():number;
|
||||
setLineHeightInPixels(lineHeightInPixels:number):void;
|
||||
batchCharacterMeasurement(fn:Function):void;
|
||||
getScopedCharWidth(scopeNames:any, char:any):any;
|
||||
setScopedCharWidth(scopeNames:any, char:any, width:any):any;
|
||||
getScopedCharWidths(scopeNames:any):any;
|
||||
clearScopedCharWidths():any;
|
||||
getDefaultCharWidth():number;
|
||||
setDefaultCharWidth(defaultCharWidth:number):void;
|
||||
setHeight(height:number):void;
|
||||
getHeight():number;
|
||||
getClientHeight():number;
|
||||
setWidth(width:number):void;
|
||||
getWidth():number;
|
||||
getScrollTop():number;
|
||||
setScrollTop(scrollTop:number):void;
|
||||
getScrollBottom():number;
|
||||
setScrollBottom(scrollBottom:number):void;
|
||||
getScrollLeft():number;
|
||||
setScrollLeft(scrollLeft:number):void;
|
||||
getScrollRight():number;
|
||||
setScrollRight(scrollRight:number):void;
|
||||
getScrollHeight():number;
|
||||
getScrollWidth():number;
|
||||
getVisibleRowRange():number;
|
||||
intersectsVisibleRowRange(startRow:any, endRow:any):any;
|
||||
selectionIntersectsVisibleRowRange(selection:any):any;
|
||||
pixelPositionForScreenPosition(screenPosition:any):any;
|
||||
pixelPositionForBufferPosition(bufferPosition:any):any;
|
||||
screenPositionForPixelPosition(pixelPosition:any):any;
|
||||
pixelRectForScreenRange(screenRange:any):any;
|
||||
scrollToScreenRange(screenRange:any, options:any):any;
|
||||
scrollToScreenPosition(screenPosition:any, options:any):any;
|
||||
scrollToBufferPosition(bufferPosition:any, options:any):any;
|
||||
horizontallyScrollable():any;
|
||||
verticallyScrollable():any;
|
||||
getHorizontalScrollbarHeight():any;
|
||||
setHorizontalScrollbarHeight(height:any):any;
|
||||
getVerticalScrollbarWidth():any;
|
||||
setVerticalScrollbarWidth(width:any):any;
|
||||
// deprecated joinLine():any;
|
||||
// joinLine():any; // deprecated
|
||||
|
||||
onDidChange(callback: Function): Disposable;
|
||||
onDidDestroy(callback: Function): Disposable;
|
||||
onDidStopChanging(callback: Function): Disposable;
|
||||
onDidChangeCursorPosition(callback: Function): Disposable;
|
||||
onDidSave(callback: (event: { path: string }) => void): Disposable;
|
||||
|
||||
screenPositionForPixelPosition: Function;
|
||||
pixelPositionForBufferPosition: Function;
|
||||
getHeight(): number;
|
||||
|
||||
decorateMarker(marker: Marker, options: any): Decoration;
|
||||
getLastCursor(): ICursor;
|
||||
}
|
||||
|
||||
interface IGrammar {
|
||||
name: any;
|
||||
scopeName: string;
|
||||
// TBD
|
||||
}
|
||||
|
||||
interface IPane /* extends Theorist.Model */ {
|
||||
itemForURI: (uri:string)=>IEditor;
|
||||
items:any[];
|
||||
activeItem:any;
|
||||
|
||||
@@ -856,6 +814,7 @@ declare module AtomCore {
|
||||
deserializeParams(params:any):any;
|
||||
getViewClass():any; // return type are PaneView
|
||||
isActive():boolean;
|
||||
isDestroyed():boolean;
|
||||
focus():void;
|
||||
blur():void;
|
||||
activate():void;
|
||||
@@ -934,7 +893,9 @@ declare module AtomCore {
|
||||
// Serializable.includeInto(Project);
|
||||
|
||||
path:string;
|
||||
rootDirectory:PathWatcher.IDirectory;
|
||||
/** deprecated */
|
||||
rootDirectory?:PathWatcher.IDirectory;
|
||||
rootDirectories:PathWatcher.IDirectory[];
|
||||
|
||||
serializeParams():any;
|
||||
deserializeParams(params:any):any;
|
||||
@@ -964,42 +925,69 @@ declare module AtomCore {
|
||||
replace(regex:any, replacementText:any, filePaths:any, iterator:any):Q.Promise<any>;
|
||||
buildEditorForBuffer(buffer:any, editorOptions:any):IEditor;
|
||||
eachBuffer(...args:any[]):any;
|
||||
|
||||
onDidChangePaths(callback: Function): Disposable;
|
||||
}
|
||||
|
||||
interface IWorkspaceStatic {
|
||||
new():IWorkspace;
|
||||
}
|
||||
|
||||
interface IWorkspacePanelOptions{
|
||||
item:any;
|
||||
visible?:boolean;
|
||||
priority?:number;
|
||||
}
|
||||
|
||||
interface Panel{
|
||||
getItem():any;
|
||||
getPriority():any;
|
||||
isVisible():boolean;
|
||||
show();
|
||||
hide();
|
||||
}
|
||||
|
||||
interface IWorkspace {
|
||||
addBottomPanel(options:IWorkspacePanelOptions):Panel;
|
||||
addLeftPanel(options:IWorkspacePanelOptions):Panel;
|
||||
addRightPanel(options:IWorkspacePanelOptions):Panel;
|
||||
addTopPanel(options:IWorkspacePanelOptions):Panel;
|
||||
addModalPanel(options:IWorkspacePanelOptions):Panel;
|
||||
addOpener(opener: Function): any;
|
||||
|
||||
deserializeParams(params:any):any;
|
||||
serializeParams():{paneContainer:any;fullScreen:boolean;};
|
||||
eachEditor(callback:Function):void;
|
||||
getEditors():IEditor[];
|
||||
eachEditor(callback: Function): void;
|
||||
getTextEditors():IEditor[];
|
||||
open(uri:string, options:any):Q.Promise<View>;
|
||||
openLicense():void;
|
||||
openSync(uri:string, options:any):any;
|
||||
openUriInPane(uri:string, pane:any, options:any):Q.Promise<View>;
|
||||
openUriInPane(uri: string, pane: any, options: any): Q.Promise<View>;
|
||||
observeTextEditors(callback: Function): Disposable;
|
||||
reopenItemSync():any;
|
||||
registerOpener(opener:(urlToOpen:string)=>any):void;
|
||||
unregisterOpener(opener:Function):void;
|
||||
getOpeners():any;
|
||||
getActivePane(): IPane;
|
||||
getActivePaneItem(): IPane;
|
||||
getActiveTextEditor(): IEditor;
|
||||
getPanes():any;
|
||||
saveAll():void;
|
||||
activateNextPane():any;
|
||||
activatePreviousPane():any;
|
||||
paneForUri: (uri:string) => IPane;
|
||||
paneForURI: (uri:string) => IPane;
|
||||
saveActivePaneItem():any;
|
||||
saveActivePaneItemAs():any;
|
||||
destroyActivePaneItem():any;
|
||||
destroyActivePane():any;
|
||||
getActiveEditor():IEditor;
|
||||
increaseFontSize():void;
|
||||
decreaseFontSize():void;
|
||||
resetFontSize():void;
|
||||
itemOpened(item:any):void;
|
||||
onPaneItemDestroyed(item:any):void;
|
||||
destroyed():void;
|
||||
|
||||
onDidChangeActivePaneItem(item:any):Disposable;
|
||||
}
|
||||
|
||||
interface IAtomSettings {
|
||||
@@ -1041,21 +1029,6 @@ declare module AtomCore {
|
||||
// TBD
|
||||
}
|
||||
|
||||
interface IPackage {
|
||||
mainModulePath: string;
|
||||
mainModule: any;
|
||||
enable(): void;
|
||||
disable(): void;
|
||||
isTheme(): boolean;
|
||||
getType(): string;
|
||||
getStylesheetType(): string;
|
||||
load(): IPackage;
|
||||
reset(): void;
|
||||
activate(): Q.Promise<any[]>;
|
||||
activateNow(): void;
|
||||
// TBD
|
||||
}
|
||||
|
||||
interface IPackageManager extends Emissary.IEmitter {
|
||||
packageDirPaths:string[];
|
||||
loadedPackages:any;
|
||||
@@ -1072,7 +1045,7 @@ declare module AtomCore {
|
||||
activate():void;
|
||||
registerPackageActivator(activator:any, types:any):void;
|
||||
activatePackages(packages:any):void;
|
||||
activatePackage(name:string):Q.Promise<IPackage>;
|
||||
activatePackage(name:string):any;
|
||||
deactivatePackages():void;
|
||||
deactivatePackage(name:string):void;
|
||||
getActivePackages():any;
|
||||
@@ -1098,6 +1071,13 @@ declare module AtomCore {
|
||||
getAvailablePackageMetadata():any[];
|
||||
}
|
||||
|
||||
interface INotifications {
|
||||
addInfo: Function;
|
||||
addError: Function;
|
||||
addSuccess: Function;
|
||||
addWarning: Function;
|
||||
}
|
||||
|
||||
interface IThemeManager {
|
||||
// TBD
|
||||
}
|
||||
@@ -1111,7 +1091,8 @@ declare module AtomCore {
|
||||
}
|
||||
|
||||
interface IClipboard {
|
||||
// TBD
|
||||
write(text:string, metadata?:any):any;
|
||||
read():string;
|
||||
}
|
||||
|
||||
interface ISyntax {
|
||||
@@ -1125,14 +1106,7 @@ declare module AtomCore {
|
||||
interface IAtomStatic extends ISerializationStatic<IAtom> {
|
||||
version: number;
|
||||
loadSettings: IAtomSettings;
|
||||
|
||||
/* Load or create the Atom environment in the given mode */
|
||||
loadOrCreate(mode:'editor'):IAtom;
|
||||
/* Load or create the Atom environment in the given mode */
|
||||
loadOrCreate(mode:'spec'):IAtom;
|
||||
/* Load or create the Atom environment in the given mode */
|
||||
loadOrCreate(mode:string):IAtom;
|
||||
|
||||
loadState(mode:any):void;
|
||||
getStatePath(mode:any):string;
|
||||
getConfigDirPath():string;
|
||||
@@ -1145,23 +1119,24 @@ declare module AtomCore {
|
||||
new(state:IAtomState):IAtom;
|
||||
}
|
||||
|
||||
// https://atom.io/docs/api/v0.106.0/api/classes/Atom.html
|
||||
/* Global Atom class : instance members */
|
||||
interface IAtom {
|
||||
constructor:IAtomStatic;
|
||||
|
||||
state:IAtomState;
|
||||
mode:string;
|
||||
deserializers:IDeserializerManager;
|
||||
config: IConfig;
|
||||
config: IConfig;
|
||||
commands: ICommandRegistry;
|
||||
keymaps: IKeymapManager;
|
||||
keymap: IKeymapManager;
|
||||
packages: IPackageManager;
|
||||
themes: IThemeManager;
|
||||
contextManu: IContextMenuManager;
|
||||
menu: IMenuManager;
|
||||
notifications: INotifications; // https://github.com/atom/notifications
|
||||
clipboard:IClipboard;
|
||||
syntax:ISyntax;
|
||||
views: IViewRegistry;
|
||||
windowEventHandler: IWindowEventHandler;
|
||||
|
||||
// really exists? start
|
||||
@@ -1228,7 +1203,9 @@ declare module AtomCore {
|
||||
beep:Function;
|
||||
getUserInitScriptPath:Function;
|
||||
requireUserInitScript:Function;
|
||||
requireWithGlobals:Function;
|
||||
requireWithGlobals: Function;
|
||||
|
||||
services: any; // TODO: New services api
|
||||
}
|
||||
|
||||
interface IBufferedNodeProcessStatic {
|
||||
@@ -1704,6 +1681,7 @@ declare module "atom" {
|
||||
cancelling:boolean;
|
||||
items:any[];
|
||||
list:JQuery;
|
||||
filterEditorView: JQuery;
|
||||
|
||||
previouslyFocusedElement:JQuery;
|
||||
|
||||
@@ -1739,7 +1717,7 @@ declare module "atom" {
|
||||
|
||||
confirmSelection():any;
|
||||
|
||||
viewForItem(item:any):JQuery; // You must override this method!
|
||||
viewForItem(item:any):JQuery|string|HTMLElement|View; // You must override this method!
|
||||
confirmed(item:any):any; // You must override this method!
|
||||
getFilterKey():any;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user