Skip to content

Commit

Permalink
fix(50866): emit modifiers from export declarations (#50874)
Browse files Browse the repository at this point in the history
  • Loading branch information
a-tarasyuk committed Sep 21, 2022
1 parent 92a1b12 commit 1d9ab83
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/compiler/emitter.ts
Expand Up @@ -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) {
Expand Down
13 changes: 13 additions & 0 deletions tests/cases/fourslash/organizeImports12.ts
@@ -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 };
`);

0 comments on commit 1d9ab83

Please sign in to comment.