@@ -231,8 +231,10 @@ function handleProperty(child: Node): Partial<Property> {
231231 * @param child The child node to handle.
232232 * @param name Optional name for the method.
233233 */
234- function handleMethod ( child : Node , name ?:string ) : Partial < Method > {
235- if ( ! name ) name = string ( child . values [ 0 ] ) ;
234+ function handleMethod ( child : Node , name ?: string ) : Partial < Method > {
235+ if ( ! name ) {
236+ name = string ( child . values [ 0 ] ) ;
237+ }
236238
237239 let typeNode : Node | undefined ;
238240 const params : { name : string ; type : string } [ ] = [ ] ;
@@ -253,13 +255,12 @@ function handleMethod(child: Node, name?:string): Partial<Method> {
253255 type : string ( c . properties . type ) ,
254256 } ) ;
255257 break ;
256-
257- case "signatures" :
258+
259+ case "signatures" :
258260 for ( const sc of c . children ) {
259- signatures . push ( handleMethod ( sc , name ) . signature ! [ 0 ] || [ ] )
261+ signatures . push ( handleMethod ( sc , name ) . signature ! [ 0 ] || [ ] ) ;
260262 }
261263 break ;
262-
263264
264265 default :
265266 throw new Error ( `Unexpected child "${ c . name } " in method "${ name } "` ) ;
@@ -275,10 +276,10 @@ function handleMethod(child: Node, name?:string): Partial<Method> {
275276 : { type : string ( child . properties ?. returns ) } ) ,
276277 } ;
277278 }
278- return { name , signature : [
279- ... ( signature ? [ signature ] : [ ] ) ,
280- ...signatures as any
281- ] } ;
279+ return {
280+ name ,
281+ signature : [ ...( signature ? [ signature ] : [ ] ) , ... ( signatures as any ) ] ,
282+ } ;
282283}
283284
284285/**
0 commit comments