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

Method isOptimizableNamedSlots

compiler/companion/src/JSXProcessor.ts:365–378  ·  view source on GitHub ↗
(
    properties: ts.NodeArray<ts.ObjectLiteralElementLike>,
  )

Source from the content-addressed store, hash-verified

363 }
364
365 private isOptimizableNamedSlots(
366 properties: ts.NodeArray<ts.ObjectLiteralElementLike>,
367 ): properties is ts.NodeArray<ts.PropertyAssignment> {
368 for (const property of properties) {
369 if (!ts.isPropertyAssignment(property)) {
370 return false;
371 }
372 if (!(ts.isIdentifier(property.name) || ts.isStringLiteral(property.name))) {
373 return false;
374 }
375 }
376
377 return true;
378 }
379
380 private toStringLiteral(node: ts.PropertyName, transformContext: ts.TransformationContext): ts.Expression {
381 if (ts.isStringLiteral(node)) {

Callers 1

Calls 1

isIdentifierMethod · 0.80

Tested by

no test coverage detected