We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1cd484a commit adaa69aCopy full SHA for adaa69a
packages/svelte/src/compiler/phases/3-transform/client/visitors/NewExpression.js
@@ -0,0 +1,24 @@
1
+/** @import { NewExpression, Expression } from 'estree' */
2
+/** @import { Context } from '../types' */
3
+import { dev } from '../../../../state.js';
4
+import { trace } from '../utils.js';
5
+
6
+/**
7
+ * @param {NewExpression} node
8
+ * @param {Context} context
9
+ */
10
+export function NewExpression(node, context) {
11
+ if (dev) {
12
+ return trace(
13
+ node,
14
+ {
15
+ ...node,
16
+ callee: /** @type {Expression} */ (context.visit(node.callee)),
17
+ arguments: node.arguments.map((arg) => /** @type {Expression} */ (context.visit(arg)))
18
+ },
19
+ context.state
20
+ );
21
+ }
22
23
+ context.next();
24
+}
0 commit comments