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

Function assertOptionalToken

test/fixtures/snapshot/typescript.js:2803–2807  ·  view source on GitHub ↗
(node, kind, message, stackCrawlMark)

Source from the content-addressed store, hash-verified

2801 }
2802 Debug.assertOptionalNode = assertOptionalNode;
2803 function assertOptionalToken(node, kind, message, stackCrawlMark) {
2804 if (shouldAssertFunction(1 /* AssertionLevel.Normal */, "assertOptionalToken")) {
2805 assert(kind === undefined || node === undefined || node.kind === kind, message || "Unexpected node.", function () { return "Node ".concat(formatSyntaxKind(node === null || node === void 0 ? void 0 : node.kind), " was not a '").concat(formatSyntaxKind(kind), "' token."); }, stackCrawlMark || assertOptionalToken);
2806 }
2807 }
2808 Debug.assertOptionalToken = assertOptionalToken;
2809 function assertMissingNode(node, message, stackCrawlMark) {
2810 if (shouldAssertFunction(1 /* AssertionLevel.Normal */, "assertMissingNode")) {

Callers

nothing calls this directly

Calls 4

shouldAssertFunctionFunction · 0.85
formatSyntaxKindFunction · 0.85
concatMethod · 0.80
assertFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…