MCPcopy Create free account
hub / github.com/Snapchat/Valdi / outputSlotExpression

Method outputSlotExpression

compiler/companion/src/JSXProcessor.ts:346–363  ·  view source on GitHub ↗
(
    sourceNode: ts.Node,
    intrinsicCallArguments: ts.NodeArray<ts.Node>,
    output: JSXOutputState,
    transformContext: ts.TransformationContext,
  )

Source from the content-addressed store, hash-verified

344 }
345
346 private outputSlotExpression(
347 sourceNode: ts.Node,
348 intrinsicCallArguments: ts.NodeArray<ts.Node>,
349 output: JSXOutputState,
350 transformContext: ts.TransformationContext,
351 ): ts.Statement {
352 if (intrinsicCallArguments.length !== 1) {
353 this.onError(sourceNode, `Intrinsic slot call should have 1 argument`);
354 }
355 const node = this.transformNode(intrinsicCallArguments[0], output, transformContext);
356
357 return this.createRendererCall(
358 'setUnnamedSlot',
359 [this.toExpression(node, transformContext)],
360 undefined,
361 transformContext,
362 );
363 }
364
365 private isOptimizableNamedSlots(
366 properties: ts.NodeArray<ts.ObjectLiteralElementLike>,

Callers 1

outputSlotMethod · 0.95

Calls 4

onErrorMethod · 0.95
transformNodeMethod · 0.95
createRendererCallMethod · 0.95
toExpressionMethod · 0.95

Tested by

no test coverage detected