diff --git a/atom/atom.d.ts b/atom/atom.d.ts
index 43a682a793..80388ad070 100644
--- a/atom/atom.d.ts
+++ b/atom/atom.d.ts
@@ -7,6 +7,7 @@
///
///
///
+///
///
///
@@ -41,7 +42,7 @@ declare module AtomCore {
// delegate to model property's method
open(uri:string, options:any):Q.Promise;
- openSync(uri:string, options:any):any;
+ openSync(uri:string, options?:any):any;
saveActivePaneItem():any;
saveActivePaneItemAs():any;
saveAll():void;
@@ -823,8 +824,46 @@ declare module AtomCore {
height:number;
}
- interface IProject {
- // TBD
+ interface IProjectStatic {
+ pathForRepositoryUrl(repoUrl:string):string;
+
+ new (arg?:{path:any; buffers:any[];}):IProject;
+ }
+
+ interface IProject /* extends Theorist.Model */ {
+ // Serializable.includeInto(Project);
+
+ path:string;
+ rootDirectory:PathWatcher.IDirectory;
+
+ serializeParams():any;
+ deserializeParams(params:any):any;
+ destroyed():any;
+ destroyRepo():any;
+ destroyUnretainedBuffers():any;
+ getRepo():IGit;
+ getPath():string;
+ setPath(projectPath:string):any;
+ getRootDirectory():PathWatcher.IDirectory;
+ resolve(uri:string):string;
+ relativize(fullPath:string):string;
+ contains(pathToCheck:string):boolean;
+ open(filePath:string, options?:any):Q.Promise;
+ openSync(filePath:string, options?:any):IEditor;
+ getBuffers():TextBuffer.ITextBuffer;
+ isPathModified(filePath:string):boolean;
+ findBufferForPath(filePath:string):TextBuffer.ITextBuffer;
+ bufferForPathSync(filePath:string):TextBuffer.ITextBuffer;
+ bufferForPath(filePath:string):Q.Promise;
+ bufferForId(id:any):TextBuffer.ITextBuffer;
+ buildBufferSync(absoluteFilePath:string):TextBuffer.ITextBuffer;
+ buildBuffer(absoluteFilePath:string):Q.Promise;
+ addBuffer(buffer:TextBuffer.ITextBuffer, options?:any):any;
+ addBufferAtIndex(buffer:TextBuffer.ITextBuffer, index:number, options?:any):any;
+ scan(regex:any, options:any, iterator:any):Q.Promise;
+ replace(regex:any, replacementText:any, filePaths:any, iterator:any):Q.Promise;
+ buildEditorForBuffer(buffer:any, editorOptions:any):IEditor;
+ eachBuffer(...args:any[]):any;
}
interface IWorkspaceStatic {
diff --git a/pathwatcher/pathwatcher.d.ts b/pathwatcher/pathwatcher.d.ts
index 1f481979ba..a4570e1cbe 100644
--- a/pathwatcher/pathwatcher.d.ts
+++ b/pathwatcher/pathwatcher.d.ts
@@ -6,25 +6,7 @@
///
///
-declare module "pathwatcher" {
-
- import events = require("events");
-
- interface IHandleWatcher extends events.EventEmitter {
- onEvent(event:any, filePath:any, oldFilePath:any):any;
- start():void;
- closeIfNoListener():void;
- close():void;
- }
-
- interface IPathWatcher {
- isWatchingParent:boolean;
- path:any;
- handleWatcher:IHandleWatcher;
-
- close():void;
- }
-
+declare module PathWatcher {
interface IFileStatic {
new (path:string, symlink?:boolean):IFile;
}
@@ -75,6 +57,26 @@ declare module "pathwatcher" {
unsubscribeFromNativeChangeEvents():void;
isPathPrefixOf(prefix:string, fullPath:string):boolean;
}
+}
+
+declare module "pathwatcher" {
+
+ import events = require("events");
+
+ interface IHandleWatcher extends events.EventEmitter {
+ onEvent(event:any, filePath:any, oldFilePath:any):any;
+ start():void;
+ closeIfNoListener():void;
+ close():void;
+ }
+
+ interface IPathWatcher {
+ isWatchingParent:boolean;
+ path:any;
+ handleWatcher:IHandleWatcher;
+
+ close():void;
+ }
function watch(path:string, callback:Function):IPathWatcher;
@@ -82,6 +84,6 @@ declare module "pathwatcher" {
function getWatchedPaths():string[];
- var File:IFileStatic;
- var Directory:IDirectoryStatic;
+ var File:PathWatcher.IFileStatic;
+ var Directory:PathWatcher.IDirectoryStatic;
}