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

Method toBlock

compiler/companion/src/JSXProcessor.ts:260–266  ·  view source on GitHub ↗
(statements: ts.Statement[], transformContext: ts.TransformationContext)

Source from the content-addressed store, hash-verified

258 }
259
260 private toBlock(statements: ts.Statement[], transformContext: ts.TransformationContext): ts.Block {
261 if (statements.length === 1 && ts.isBlock(statements[0])) {
262 return statements[0] as ts.Block;
263 }
264
265 return transformContext.factory.createBlock(statements, true);
266 }
267
268 private mergeStatements(statements: ts.Statement[], transformContext: ts.TransformationContext): ts.Statement {
269 if (!statements.length) {

Callers 4

toExpressionMethod · 0.95
mergeStatementsMethod · 0.95
outputSlotMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected