File tree 2 files changed +18
-3
lines changed 2 files changed +18
-3
lines changed Original file line number Diff line number Diff line change @@ -86,7 +86,19 @@ declare type Remark = {
86
86
children : Array < Object >
87
87
} ;
88
88
89
+ declare type Access = 'private' | 'public' | 'protected' ;
89
90
declare type Scope = 'instance' | 'static' | 'inner' | 'global' ;
91
+ declare type Kind = 'class' |
92
+ 'constant' |
93
+ 'event' |
94
+ 'external' |
95
+ 'file' |
96
+ 'function' |
97
+ 'member' |
98
+ 'mixin' |
99
+ 'module' |
100
+ 'namespace' |
101
+ 'typedef' ;
90
102
91
103
declare type Comment = {
92
104
errors : Array < CommentError > ,
@@ -110,10 +122,11 @@ declare type Comment = {
110
122
members : CommentMembers ,
111
123
112
124
name ?: string ,
113
- kind ?: string ,
125
+ kind ?: Kind ,
126
+
114
127
memberof ?: string ,
115
128
scope ?: Scope ,
116
- access ?: string ,
129
+ access ?: Access ,
117
130
alias ?: string ,
118
131
119
132
copyright ?: string ,
@@ -136,6 +149,6 @@ declare type Comment = {
136
149
137
150
declare type ReducedComment = {
138
151
name : string ,
139
- kind : ?string ,
152
+ kind : ?Kind ,
140
153
scope ?: ?Scope
141
154
}
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ var flatteners = {
21
21
* @returns {undefined } has side-effects
22
22
*/
23
23
'access' : function ( result , tag ) {
24
+ // doctrine ensures that tag.access is valid
24
25
result . access = tag . access ;
25
26
} ,
26
27
'alias' : flattenName ,
@@ -208,6 +209,7 @@ var flatteners = {
208
209
* @returns {undefined } has side-effects
209
210
*/
210
211
'kind' : function ( result , tag ) {
212
+ // doctrine ensures that tag.kind is valid
211
213
result . kind = tag . kind ;
212
214
} ,
213
215
'lends' : flattenDescription ,
You can’t perform that action at this time.
0 commit comments