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

Function checkGrammarExportDeclaration

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

Source from the content-addressed store, hash-verified

85391 checkAssertClause(node);
85392 }
85393 function checkGrammarExportDeclaration(node) {
85394 var _a;
85395 if (node.isTypeOnly) {
85396 if (((_a = node.exportClause) === null || _a === void 0 ? void 0 : _a.kind) === 273 /* SyntaxKind.NamedExports */) {
85397 return checkGrammarNamedImportsOrExports(node.exportClause);
85398 }
85399 else {
85400 return grammarErrorOnNode(node, ts.Diagnostics.Only_named_exports_may_use_export_type);
85401 }
85402 }
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) {

Callers 1

checkExportDeclarationFunction · 0.85

Calls 2

grammarErrorOnNodeFunction · 0.85

Tested by

no test coverage detected