File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,12 @@ var flatteners = {
79
79
'instance' : function ( result ) {
80
80
result . scope = 'instance' ;
81
81
} ,
82
- // 'interface'
82
+ 'interface' : function ( result , tag ) {
83
+ result . interface = true ;
84
+ if ( tag . description ) {
85
+ result . name = tag . description ;
86
+ }
87
+ } ,
83
88
'kind' : function ( result , tag ) {
84
89
result . kind = tag . kind ;
85
90
} ,
Original file line number Diff line number Diff line change @@ -254,6 +254,18 @@ test('parse - @instance', function (t) {
254
254
t . end ( ) ;
255
255
} ) ;
256
256
257
+ test ( 'parse - @interface' , function ( t ) {
258
+ t . deepEqual ( evaluate ( function ( ) {
259
+ /** @interface */
260
+ } ) [ 0 ] . interface , true , 'anonymous' ) ;
261
+
262
+ t . deepEqual ( evaluate ( function ( ) {
263
+ /** @interface Foo */
264
+ } ) [ 0 ] . name , 'Foo' , 'named' ) ;
265
+
266
+ t . end ( ) ;
267
+ } ) ;
268
+
257
269
test ( 'parse - @kind' , function ( t ) {
258
270
t . equal ( evaluate ( function ( ) {
259
271
/** @kind class */
You can’t perform that action at this time.
0 commit comments