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

Function checkBlock

test/fixtures/snapshot/typescript.js:82232–82248  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

82230 return decl.kind === 267 /* SyntaxKind.ImportClause */ ? decl : decl.kind === 268 /* SyntaxKind.NamespaceImport */ ? decl.parent : decl.parent.parent;
82231 }
82232 function checkBlock(node) {
82233 // Grammar checking for SyntaxKind.Block
82234 if (node.kind === 235 /* SyntaxKind.Block */) {
82235 checkGrammarStatementInAmbientContext(node);
82236 }
82237 if (ts.isFunctionOrModuleBlock(node)) {
82238 var saveFlowAnalysisDisabled = flowAnalysisDisabled;
82239 ts.forEach(node.statements, checkSourceElement);
82240 flowAnalysisDisabled = saveFlowAnalysisDisabled;
82241 }
82242 else {
82243 ts.forEach(node.statements, checkSourceElement);
82244 }
82245 if (node.locals) {
82246 registerForUnusedIdentifiersCheck(node);
82247 }
82248 }
82249 function checkCollisionWithArgumentsInGeneratedCode(node) {
82250 // no rest parameters \ declaration context \ overload - no codegen impact
82251 if (languageVersion >= 2 /* ScriptTarget.ES2015 */ || !ts.hasRestParameter(node) || node.flags & 16777216 /* NodeFlags.Ambient */ || ts.nodeIsMissing(node.body)) {

Callers 2

checkTryStatementFunction · 0.85
checkSourceElementWorkerFunction · 0.85

Calls 3

forEachMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…