fix(50866): emit modifiers from export declarations (#50874)

This commit is contained in:
Oleksandr T 2022-09-21 19:59:15 +03:00 committed by GitHub
parent 92a1b124c1
commit 1d9ab83914
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 0 deletions

View File

@ -3491,6 +3491,7 @@ namespace ts {
}
function emitExportDeclaration(node: ExportDeclaration) {
emitModifiers(node, node.modifiers);
let nextPos = emitTokenWithComment(SyntaxKind.ExportKeyword, node.pos, writeKeyword, node);
writeSpace();
if (node.isTypeOnly) {

View File

@ -0,0 +1,13 @@
/// <reference path="fourslash.ts" />
// @allowJs: true
// @Filename: /test.js
////declare export default class A {}
////declare export { a, b };
////declare export * from "foo";
verify.organizeImports(
`declare export default class A {}
declare export * from "foo";
declare export { a, b };
`);