forked from DefinitelyTyped/DefinitelyTyped
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api-docs.d.ts
107 lines (93 loc) · 2.38 KB
/
api-docs.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
// Type definitions for Atom API docs
// Project: https://github.com/atom/atom/blob/master/build/tasks/docs-task.coffee
// Definitions by: vvakame <https://github.com/vvakame/>
// Definitions: https://github.com/borisyankov/DefinitelyTyped
/*
How to generate.
$ git clone [email protected]:atom/atom.git
$ cd atom
$ npm install
$ cd build
$ npm install
$ grunt build-docs
$ cd ../
$ ls -la la docs/output/api.json
api.json example https://gist.github.com/vvakame/10f8d2f3884affc32476
*/
declare module AtomDocTypes {
interface Metadata {
classes: { [className: string]: ClassInfo; };
}
interface ClassInfo {
name: string;
superClass: string;
visibility: string;
filename: string;
srcUrl: string;
summary: string;
description: string;
examples: Example[];
sections: Section[];
classMethods: ClassMethod[];
classProperties: ClassProperty[];
instanceMethods: InstanceMethod[];
instanceProperties: InstanceProperty[];
}
interface Example {
description: string;
lang: string;
code: string;
raw: string;
}
interface Section {
name: string;
description: string;
}
interface ClassMethod {
name: string;
sectionName: string;
srcUrl: string;
visibility: string;
summary: string;
description: string;
arguments: Argument[];
returnValues: ReturnValue[];
}
interface ClassProperty {
}
interface InstanceMethod {
name: string;
sectionName: string;
srcUrl: string;
visibility: string;
summary: string;
description: string;
arguments: Argument[];
returnValues: ReturnValue[];
titledArguments: TitledArgument[];
}
interface InstanceProperty {
name: string;
sectionName: string;
srcUrl: string;
visibility: string;
summary: string;
description: string;
}
interface Argument {
name: string;
description: string;
type: string;
isOptional: boolean;
children: Argument[];
}
interface TitledArgument {
title: string;
description: string;
arguments: Argument[];
}
interface ReturnValue {
type: string;
description: string;
}
}