Skip to content

Commit ab678e7

Browse files
committed
Generate wrapper binding functions for non-identifier imports
This change should ensure performance.now() and document.foo() does not break.
1 parent 7a35ff8 commit ab678e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/bindings/js.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ export class JSBuilder extends ExportsWalker {
285285
sb.push(escapeString(name, CharCode.DoubleQuote));
286286
sb.push("\"");
287287
}
288-
if (isPlainFunction(signature, Mode.Import) && !code) {
288+
if (isPlainFunction(signature, Mode.Import) && !code && isIdentifier(name)) {
289289
sb.push(": (\n");
290290
indent(sb, this.indentLevel + 1);
291291
sb.push("// ");

0 commit comments

Comments
 (0)