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

Function createTypeAssertion

test/fixtures/snapshot/typescript.js:24237–24246  ·  view source on GitHub ↗
(type, expression)

Source from the content-addressed store, hash-verified

24235 }
24236 // @api
24237 function createTypeAssertion(type, expression) {
24238 var node = createBaseExpression(211 /* SyntaxKind.TypeAssertionExpression */);
24239 node.expression = parenthesizerRules().parenthesizeOperandOfPrefixUnary(expression);
24240 node.type = type;
24241 node.transformFlags |=
24242 propagateChildFlags(node.expression) |
24243 propagateChildFlags(node.type) |
24244 1 /* TransformFlags.ContainsTypeScript */;
24245 return node;
24246 }
24247 // @api
24248 function updateTypeAssertion(node, type, expression) {
24249 return node.type !== type

Callers 1

updateTypeAssertionFunction · 0.85

Calls 2

createBaseExpressionFunction · 0.85
propagateChildFlagsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…