Skip to content

Commit 688746a

Browse files
authoredApr 23, 2023
fix: Generate wrapper binding functions for non-identifier imports (#2657)
1 parent 3b2381b commit 688746a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎src/bindings/js.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ export class JSBuilder extends ExportsWalker {
300300
sb.push(escapeString(name, CharCode.DoubleQuote));
301301
sb.push("\"");
302302
}
303-
if (isPlainFunction(signature, Mode.Import) && !code) {
303+
if (isPlainFunction(signature, Mode.Import) && !code && isIdentifier(name)) {
304304
sb.push(": (\n");
305305
indent(sb, this.indentLevel + 1);
306306
sb.push("// ");

0 commit comments

Comments
 (0)
Please sign in to comment.