Add IPackage interface, fix IPackageManager

This commit is contained in:
SHTrassEr
2014-07-08 23:45:28 +09:00
parent d20e745171
commit a795ca109d

19
atom/atom.d.ts vendored
View File

@@ -941,6 +941,19 @@ declare module AtomCore {
// TBD
}
interface IPackage {
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;
@@ -957,7 +970,7 @@ declare module AtomCore {
activate():void;
registerPackageActivator(activator:any, types:any):void;
activatePackages(packages:any):void;
activatePackage(name:string):void;
activatePackage(name:string):Q.Promise<IPackage>;
deactivatePackages():void;
deactivatePackage(name:string):void;
getActivePackages():any;
@@ -1010,14 +1023,14 @@ 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;