mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 12:51:30 -05:00
fix(50866): emit modifiers from export declarations (#50874)
This commit is contained in:
@@ -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) {
|
||||
|
||||
13
tests/cases/fourslash/organizeImports12.ts
Normal file
13
tests/cases/fourslash/organizeImports12.ts
Normal 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 };
|
||||
`);
|
||||
Reference in New Issue
Block a user