From 6b3d97d9b6472b1d8472f4466e7df9c178a6bf6b Mon Sep 17 00:00:00 2001 From: basarat Date: Sat, 21 Jun 2014 23:49:19 +1000 Subject: [PATCH 1/2] atom: add doc links --- atom/atom.d.ts | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/atom/atom.d.ts b/atom/atom.d.ts index 8cbde4d55..0c50c62f6 100644 --- a/atom/atom.d.ts +++ b/atom/atom.d.ts @@ -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. -// NOTE Document? You should use DevTools hehe... +// API documentation : https://atom.io/docs/api/v0.106.0/api/docs/README.md.html interface Window { atom: AtomCore.IAtom; @@ -1010,7 +1010,14 @@ declare module AtomCore { interface IAtomStatic extends ISerializationStatic { version: number; loadSettings: IAtomSettings; - loadOrCreate(mode:string):IAtom; + + /* 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; @@ -1023,7 +1030,9 @@ declare module AtomCore { new(state:IAtomState):IAtom; } - interface IAtom { + // https://atom.io/docs/api/v0.106.0/api/classes/Atom.html + /* Global Atom class : instance members */ + interface IAtom { constructor:IAtomStatic; state:IAtomState; From 989897e63028e828395edc111768eb30891be056 Mon Sep 17 00:00:00 2001 From: basarat Date: Sat, 21 Jun 2014 23:51:30 +1000 Subject: [PATCH 2/2] fix indents --- atom/atom.d.ts | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/atom/atom.d.ts b/atom/atom.d.ts index 0c50c62f6..1b5e55f2a 100644 --- a/atom/atom.d.ts +++ b/atom/atom.d.ts @@ -1011,13 +1011,13 @@ declare module AtomCore { 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; - + /* 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; @@ -1030,9 +1030,9 @@ declare module AtomCore { new(state:IAtomState):IAtom; } - // https://atom.io/docs/api/v0.106.0/api/classes/Atom.html + // https://atom.io/docs/api/v0.106.0/api/classes/Atom.html /* Global Atom class : instance members */ - interface IAtom { + interface IAtom { constructor:IAtomStatic; state:IAtomState;