(pos, hasJSDoc, decorators, modifiers)
| 37297 | return finishNode(factory.createNamespaceExport(parseIdentifierName()), pos); |
| 37298 | } |
| 37299 | function parseExportDeclaration(pos, hasJSDoc, decorators, modifiers) { |
| 37300 | var savedAwaitContext = inAwaitContext(); |
| 37301 | setAwaitContext(/*value*/ true); |
| 37302 | var exportClause; |
| 37303 | var moduleSpecifier; |
| 37304 | var assertClause; |
| 37305 | var isTypeOnly = parseOptional(152 /* SyntaxKind.TypeKeyword */); |
| 37306 | var namespaceExportPos = getNodePos(); |
| 37307 | if (parseOptional(41 /* SyntaxKind.AsteriskToken */)) { |
| 37308 | if (parseOptional(127 /* SyntaxKind.AsKeyword */)) { |
| 37309 | exportClause = parseNamespaceExport(namespaceExportPos); |
| 37310 | } |
| 37311 | parseExpected(156 /* SyntaxKind.FromKeyword */); |
| 37312 | moduleSpecifier = parseModuleSpecifier(); |
| 37313 | } |
| 37314 | else { |
| 37315 | exportClause = parseNamedImportsOrExports(273 /* SyntaxKind.NamedExports */); |
| 37316 | // It is not uncommon to accidentally omit the 'from' keyword. Additionally, in editing scenarios, |
| 37317 | // the 'from' keyword can be parsed as a named export when the export clause is unterminated (i.e. `export { from "moduleName";`) |
| 37318 | // If we don't have a 'from' keyword, see if we have a string literal such that ASI won't take effect. |
| 37319 | if (token() === 156 /* SyntaxKind.FromKeyword */ || (token() === 10 /* SyntaxKind.StringLiteral */ && !scanner.hasPrecedingLineBreak())) { |
| 37320 | parseExpected(156 /* SyntaxKind.FromKeyword */); |
| 37321 | moduleSpecifier = parseModuleSpecifier(); |
| 37322 | } |
| 37323 | } |
| 37324 | if (moduleSpecifier && token() === 129 /* SyntaxKind.AssertKeyword */ && !scanner.hasPrecedingLineBreak()) { |
| 37325 | assertClause = parseAssertClause(); |
| 37326 | } |
| 37327 | parseSemicolon(); |
| 37328 | setAwaitContext(savedAwaitContext); |
| 37329 | var node = factory.createExportDeclaration(decorators, modifiers, isTypeOnly, exportClause, moduleSpecifier, assertClause); |
| 37330 | return withJSDoc(finishNode(node, pos), hasJSDoc); |
| 37331 | } |
| 37332 | function parseExportAssignment(pos, hasJSDoc, decorators, modifiers) { |
| 37333 | var savedAwaitContext = inAwaitContext(); |
| 37334 | setAwaitContext(/*value*/ true); |
no test coverage detected
searching dependent graphs…