Skip to content

Commit 528e267

Browse files
committed
eemove redundant empty export
1 parent 21c11bc commit 528e267

File tree

5 files changed

+2
-36
lines changed

5 files changed

+2
-36
lines changed

internal/transformers/declarations/transform.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ func (tx *DeclarationTransformer) transformFunctionDeclaration(input *ast.Functi
13221322
tx.resultHasExternalModuleIndicator = true
13231323
}
13241324

1325-
tx.resultHasScopeMarker = false
1325+
tx.resultHasScopeMarker = true
13261326

13271327
return tx.Factory().NewSyntaxList([]*ast.Node{
13281328
updatedFunctionDeclaration,

testdata/baselines/reference/submodule/compiler/declarationEmitDefaultExportWithStaticAssignment.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,6 @@ declare namespace Example {
8787
var Foo: typeof import("./foo").Foo;
8888
}
8989
export default Example;
90-
export {};
9190
//// [index2.d.ts]
9291
import { Foo } from './foo';
9392
export { Foo };
@@ -96,7 +95,6 @@ declare namespace Example {
9695
var Foo: typeof import("./foo").Foo;
9796
}
9897
export default Example;
99-
export {};
10098
//// [index3.d.ts]
10199
export declare class Bar {
102100
}
@@ -105,7 +103,6 @@ declare namespace Example {
105103
var Bar: typeof import("./index3").Bar;
106104
}
107105
export default Example;
108-
export {};
109106
//// [index4.d.ts]
110107
export declare function C(): any;
111108
export declare namespace C {

testdata/baselines/reference/submodule/compiler/declarationEmitDefaultExportWithStaticAssignment.js.diff

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,7 @@
1818
Object.defineProperty(exports, "Foo", { enumerable: true, get: function () { return foo_1.Foo; } });
1919
function Example() { }
2020
Example.Foo = foo_1.Foo;
21-
@@= skipped -36, +36 lines =@@
22-
var Foo: typeof import("./foo").Foo;
23-
}
24-
export default Example;
25-
+export {};
26-
//// [index2.d.ts]
27-
import { Foo } from './foo';
28-
export { Foo };
29-
@@= skipped -8, +9 lines =@@
30-
var Foo: typeof import("./foo").Foo;
31-
}
32-
export default Example;
33-
+export {};
34-
//// [index3.d.ts]
35-
export declare class Bar {
36-
}
37-
@@= skipped -8, +9 lines =@@
38-
var Bar: typeof import("./index3").Bar;
39-
}
40-
export default Example;
41-
+export {};
42-
//// [index4.d.ts]
43-
export declare function C(): any;
44-
export declare namespace C {
21+
@@= skipped -58, +58 lines =@@
4522
var A: () => void;
4623
var B: () => void;
4724
}

testdata/baselines/reference/submodule/conformance/exportDefaultNamespace.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,3 @@ declare namespace someFunc {
2424
var someProp: string;
2525
}
2626
export default someFunc;
27-
export {};

testdata/baselines/reference/submodule/conformance/exportDefaultNamespace.js.diff

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)