File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,9 @@ function renderArrowSignatures(
2020 signatures : JSONOutput . SignatureReflection [ ] ,
2121 params : Params
2222) {
23+ if ( ! signatures ) {
24+ return 'unknown' ;
25+ }
2326 return < > { signatures . map ( ( s ) => renderArrowSignature ( s , params ) ) } </ > ;
2427}
2528
@@ -226,13 +229,13 @@ export default function renderReflection(
226229 params
227230 ) ;
228231 case ReflectionKind . TypeLiteral :
229- if ( reflection . signatures ) {
230- return renderArrowSignatures ( reflection . signatures , params ) ;
231- }
232- if ( ! reflection . groups ) {
232+ if ( ! reflection . groups && ! reflection . signatures ) {
233233 console . warn ( 'Unhandled Type Literal with no group' , reflection ) ;
234234 return < TokenKeyword > any</ TokenKeyword > ;
235235 }
236+ if ( reflection . signatures ) {
237+ return renderArrowSignatures ( reflection . signatures , params ) ;
238+ }
236239 let ret : any = null ;
237240 for ( const group of reflection . groups ! ) {
238241 if ( group . kind === ReflectionKind . Property ) {
You can’t perform that action at this time.
0 commit comments