File tree Expand file tree Collapse file tree 1 file changed +10
-16
lines changed Expand file tree Collapse file tree 1 file changed +10
-16
lines changed Original file line number Diff line number Diff line change @@ -129,21 +129,24 @@ const hasDefinedTypeReturnTag = (tag) => {
129
129
return true ;
130
130
} ;
131
131
132
- const tagsWithOptionalType = [
133
- 'augments' , 'extends' ,
134
- 'class' , 'constructor' ,
135
- 'constant' , 'const' ,
132
+ const tagsWithMandatoryType = [
136
133
'enum' ,
137
134
'implements' ,
138
135
'member' , 'var' ,
139
136
'module' ,
137
+ 'type' ,
138
+ 'typedef' ,
139
+ ] ;
140
+
141
+ const tagsWithOptionalType = [
142
+ 'augments' , 'extends' ,
143
+ 'class' , 'constructor' ,
144
+ 'constant' , 'const' ,
140
145
'namespace' ,
141
146
'param' , 'arg' , 'argument' ,
142
147
'property' , 'prop' ,
143
148
'returns' , 'return' ,
144
149
'throws' , 'exception' ,
145
- 'type' ,
146
- 'typedef' ,
147
150
'yields' , 'yield' ,
148
151
149
152
// GCC specific
@@ -154,15 +157,6 @@ const tagsWithOptionalType = [
154
157
'static' ,
155
158
] ;
156
159
157
- const tagsWithMandatoryType = [
158
- 'enum' ,
159
- 'implements' ,
160
- 'member' , 'var' ,
161
- 'module' ,
162
- 'type' ,
163
- 'typedef' ,
164
- ] ;
165
-
166
160
const namepathDefiningTags = [
167
161
'external' , 'host' ,
168
162
'name' ,
@@ -219,7 +213,7 @@ const isNamepathDefiningTag = (tagName) => {
219
213
} ;
220
214
221
215
const tagMightHaveType = ( tag ) => {
222
- return tagsWithOptionalType . includes ( tag ) ;
216
+ return tagsWithMandatoryType . includes ( tag ) || tagsWithOptionalType . includes ( tag ) ;
223
217
} ;
224
218
225
219
const tagMustHaveType = ( tag ) => {
You can’t perform that action at this time.
0 commit comments