@@ -3100,7 +3100,7 @@ export class LuaTransformer {
31003100 }
31013101
31023102 const callPath = this . transformExpression ( node . expression ) ;
3103- const signatureDeclaration = signature . getDeclaration ( ) ;
3103+ const signatureDeclaration = signature && signature . getDeclaration ( ) ;
31043104 if ( signatureDeclaration
31053105 && ! ts . isPropertyAccessExpression ( node . expression )
31063106 && tsHelper . getDeclarationContextType ( signatureDeclaration , this . checker ) === ContextType . NonVoid
@@ -3201,7 +3201,7 @@ export class LuaTransformer {
32013201 } else {
32023202 const parameters = this . transformArguments ( node . arguments , signature ) ;
32033203 const table = this . transformExpression ( node . expression . expression ) ;
3204- const signatureDeclaration = signature . getDeclaration ( ) ;
3204+ const signatureDeclaration = signature && signature . getDeclaration ( ) ;
32053205 if ( ! signatureDeclaration
32063206 || tsHelper . getDeclarationContextType ( signatureDeclaration , this . checker ) !== ContextType . Void )
32073207 {
@@ -3229,7 +3229,7 @@ export class LuaTransformer {
32293229 const signature = this . checker . getResolvedSignature ( node ) ;
32303230 let parameters = this . transformArguments ( node . arguments , signature ) ;
32313231
3232- const signatureDeclaration = signature . getDeclaration ( ) ;
3232+ const signatureDeclaration = signature && signature . getDeclaration ( ) ;
32333233 if ( ! signatureDeclaration
32343234 || tsHelper . getDeclarationContextType ( signatureDeclaration , this . checker ) !== ContextType . Void ) {
32353235 // Pass left-side as context
0 commit comments