Skip to content

Commit 9dcf926

Browse files
committed
Events are not a special scope
1 parent 12be53c commit 9dcf926

36 files changed

+29
-79
lines changed

lib/hierarchy.js

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ function addPath(comment, prefix, namepath) {
2222
comment.members.static.forEach(function (member) {
2323
addPath(member, comment.path, namepath);
2424
});
25-
comment.events.forEach(function (member) {
26-
addPath(member, comment.path, namepath);
27-
});
2825
}
2926

3027
/**
@@ -45,7 +42,6 @@ function inferHierarchy(comments) {
4542
for (i = 0; i < comments.length; i++) {
4643
nameIndex[comments[i].name] = comments[i];
4744
comments[i].members = { instance: [], static: [] };
48-
comments[i].events = [];
4945
}
5046

5147
for (i = comments.length - 1; i >= 0; i--) {
@@ -70,16 +66,7 @@ function inferHierarchy(comments) {
7066
continue;
7167
}
7268

73-
74-
switch (comment.kind) {
75-
case 'event':
76-
parent.events.push(comment);
77-
break;
78-
79-
default:
80-
parent.members[comment.scope || 'static'].push(comment);
81-
break;
82-
}
69+
parent.members[comment.scope || 'static'].push(comment);
8370

8471
// remove non-root nodes from the lowest level: these are reachable
8572
// as members of other docs.

test/fixture/_external-deps-included.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"instance": [],
3333
"static": []
3434
},
35-
"events": [],
3635
"path": [
3736
"foo"
3837
]
@@ -91,7 +90,6 @@
9190
"instance": [],
9291
"static": []
9392
},
94-
"events": [],
9593
"path": [
9694
"index"
9795
]
@@ -150,7 +148,6 @@
150148
"instance": [],
151149
"static": []
152150
},
153-
"events": [],
154151
"path": [
155152
"main"
156153
]

test/fixture/_multi-file-input.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@
8888
"instance": [],
8989
"static": []
9090
},
91-
"events": [],
9291
"path": [
9392
"returnTwo"
9493
]
@@ -147,7 +146,6 @@
147146
"instance": [],
148147
"static": []
149148
},
150-
"events": [],
151149
"path": [
152150
"simple.input"
153151
]

test/fixture/class.output.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,6 @@
141141
"instance": [],
142142
"static": []
143143
},
144-
"events": [],
145144
"path": [
146145
"MyClass",
147146
"getFoo"
@@ -201,7 +200,6 @@
201200
"instance": [],
202201
"static": []
203202
},
204-
"events": [],
205203
"path": [
206204
"MyClass",
207205
"getUndefined"
@@ -210,7 +208,6 @@
210208
],
211209
"static": []
212210
},
213-
"events": [],
214211
"path": [
215212
"MyClass"
216213
]

test/fixture/default-param.output.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@
3939
"instance": [],
4040
"static": []
4141
},
42-
"events": [],
4342
"path": [
4443
"veryImportantTransform"
4544
]

test/fixture/es6-import.output.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"instance": [],
6666
"static": []
6767
},
68-
"events": [],
6968
"path": [
7069
"multiply"
7170
]
@@ -131,7 +130,6 @@
131130
"instance": [],
132131
"static": []
133132
},
134-
"events": [],
135133
"path": [
136134
"multiplyTwice"
137135
]

test/fixture/es6.output.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@
6565
"instance": [],
6666
"static": []
6767
},
68-
"events": [],
6968
"path": [
7069
"multiply"
7170
]

test/fixture/event.output.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@
8989
"instance": [],
9090
"static": []
9191
},
92-
"events": [],
9392
"path": [
9493
"Map#mousemove"
9594
]

test/fixture/external.output.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
"instance": [],
3333
"static": []
3434
},
35-
"events": [],
3635
"path": [
3736
"foo"
3837
]

test/fixture/factory.output.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
"instance": [],
5454
"static": []
5555
},
56-
"events": [],
5756
"path": [
5857
"area"
5958
]
@@ -109,7 +108,6 @@
109108
"instance": [],
110109
"static": []
111110
},
112-
"events": [],
113111
"path": [
114112
"area"
115113
]
@@ -169,7 +167,6 @@
169167
"instance": [],
170168
"static": []
171169
},
172-
"events": [],
173170
"path": [
174171
"data"
175172
]

0 commit comments

Comments
 (0)