File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed
Plugins/BridgeJS/Sources/TS2Swift/JavaScript/src Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ export class TypeProcessor {
261261 if ( ! isExported ) return ;
262262
263263 const fromArg = this . renderDefaultJSImportFromArgument ( ) ;
264+ const isConst = ( node . declarationList . flags & ts . NodeFlags . Const ) !== 0 ;
264265
265266 for ( const decl of node . declarationList . declarations ) {
266267 if ( ! ts . isIdentifier ( decl . name ) ) continue ;
@@ -278,7 +279,7 @@ export class TypeProcessor {
278279 if ( fromArg ) args . push ( fromArg ) ;
279280 const callSignatures = type . getCallSignatures ( ) ;
280281
281- if ( callSignatures . length > 0 ) {
282+ if ( isConst && callSignatures . length > 0 ) {
282283 const signature = callSignatures [ 0 ] ;
283284 const parameters = signature . getParameters ( ) ;
284285 const parameterNameMap = this . buildParameterNameMap ( parameters ) ;
You can’t perform that action at this time.
0 commit comments