Skip to content

Commit 1d9ab83

Browse files
authored
fix(50866): emit modifiers from export declarations (#50874)
1 parent 92a1b12 commit 1d9ab83

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

src/compiler/emitter.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3491,6 +3491,7 @@ namespace ts {
34913491
}
34923492

34933493
function emitExportDeclaration(node: ExportDeclaration) {
3494+
emitModifiers(node, node.modifiers);
34943495
let nextPos = emitTokenWithComment(SyntaxKind.ExportKeyword, node.pos, writeKeyword, node);
34953496
writeSpace();
34963497
if (node.isTypeOnly) {
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
// @allowJs: true
4+
// @Filename: /test.js
5+
////declare export default class A {}
6+
////declare export { a, b };
7+
////declare export * from "foo";
8+
9+
verify.organizeImports(
10+
`declare export default class A {}
11+
declare export * from "foo";
12+
declare export { a, b };
13+
`);

0 commit comments

Comments
 (0)