@@ -19,7 +19,7 @@ type DeepPartial<T> = T extends object
1919 : T ;
2020
2121interface Method extends Omit < originalMethod , "signature" > {
22- signature : Signature [ ] | Record < string , Signature >
22+ signature : Signature [ ] | Record < string , Signature > ;
2323}
2424
2525function optionalMember < const T > ( prop : string , type : T , value ?: Value ) {
@@ -175,15 +175,15 @@ function handleMixinandInterfaces(
175175 const methodName = string ( child . values [ 0 ] ) ;
176176 const m = handleMethod ( child ) ;
177177 method = merge ( method , {
178- [ methodName ] : m
178+ [ methodName ] : m ,
179179 } ) ;
180180 break ;
181181 }
182182 default :
183183 throw new Error ( `Unknown node name: ${ child . name } ` ) ;
184184 }
185185 }
186- console . log ( method )
186+ console . log ( method ) ;
187187
188188 const interfaceObject = type === "interface" && {
189189 ...optionalMember ( "exposed" , "string" , node . properties ?. exposed ) ,
@@ -279,18 +279,26 @@ function handleMethod(child: Node): DeepPartial<Method> {
279279 param : params ,
280280 ...( typeNode
281281 ? handleTyped ( typeNode )
282- : { ...optionalMember ( "type" , "string" , child . properties ?. returns ) , ...optionalMember ( "overrideType" , "string" , child . properties ?. overrideType ) } ) ,
282+ : {
283+ ...optionalMember ( "type" , "string" , child . properties ?. returns ) ,
284+ ...optionalMember (
285+ "overrideType" ,
286+ "string" ,
287+ child . properties ?. overrideType ,
288+ ) ,
289+ } ) ,
283290 } ;
284291
285- let signature : Record < string , DeepPartial < Signature > > | DeepPartial < Signature > [ ] ;
292+ let signature :
293+ | Record < string , DeepPartial < Signature > >
294+ | DeepPartial < Signature > [ ] ;
286295 const signatureIndex = child . properties ?. signatureIndex ;
287296 if ( typeof signatureIndex == "number" ) {
288297 signature = { [ signatureIndex ] : signatureObj } ;
289298 } else {
290299 signature = [ signatureObj ] ;
291300 }
292301 return { name, signature } ;
293-
294302}
295303
296304/**
0 commit comments