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

Function checkGrammarModuleElementContext

test/fixtures/snapshot/typescript.js:85405–85411  ·  view source on GitHub ↗
(node, errorMessage)

Source from the content-addressed store, hash-verified

85403 return false;
85404 }
85405 function checkGrammarModuleElementContext(node, errorMessage) {
85406 var isInAppropriateContext = node.parent.kind === 305 /* SyntaxKind.SourceFile */ || node.parent.kind === 262 /* SyntaxKind.ModuleBlock */ || node.parent.kind === 261 /* SyntaxKind.ModuleDeclaration */;
85407 if (!isInAppropriateContext) {
85408 grammarErrorOnFirstToken(node, errorMessage);
85409 }
85410 return !isInAppropriateContext;
85411 }
85412 function importClauseContainsReferencedImport(importClause) {
85413 return ts.forEachImportClauseDeclaration(importClause, function (declaration) {
85414 return !!getSymbolOfNode(declaration).isReferenced;

Callers 5

checkImportDeclarationFunction · 0.85
checkExportDeclarationFunction · 0.85
checkExportAssignmentFunction · 0.85

Calls 1

grammarErrorOnFirstTokenFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…