MCPcopy Index your code
hub / github.com/nodejs/node / createCatchClause

Function createCatchClause

test/fixtures/snapshot/typescript.js:26251–26267  ·  view source on GitHub ↗
(variableDeclaration, block)

Source from the content-addressed store, hash-verified

26249 }
26250 // @api
26251 function createCatchClause(variableDeclaration, block) {
26252 var node = createBaseNode(292 /* SyntaxKind.CatchClause */);
26253 if (typeof variableDeclaration === "string" || variableDeclaration && !ts.isVariableDeclaration(variableDeclaration)) {
26254 variableDeclaration = createVariableDeclaration(variableDeclaration,
26255 /*exclamationToken*/ undefined,
26256 /*type*/ undefined,
26257 /*initializer*/ undefined);
26258 }
26259 node.variableDeclaration = variableDeclaration;
26260 node.block = block;
26261 node.transformFlags |=
26262 propagateChildFlags(node.variableDeclaration) |
26263 propagateChildFlags(node.block);
26264 if (!variableDeclaration)
26265 node.transformFlags |= 64 /* TransformFlags.ContainsES2019 */;
26266 return node;
26267 }
26268 // @api
26269 function updateCatchClause(node, variableDeclaration, block) {
26270 return node.variableDeclaration !== variableDeclaration

Callers 1

updateCatchClauseFunction · 0.85

Calls 3

createBaseNodeFunction · 0.85
propagateChildFlagsFunction · 0.85

Tested by

no test coverage detected