mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-25 22:01:51 -05:00
do not emit exportsStar function if module does not expose any values
This commit is contained in:
8
tests/cases/compiler/exportStarForValues.ts
Normal file
8
tests/cases/compiler/exportStarForValues.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
// @module: amd
|
||||
|
||||
// @filename: file1.ts
|
||||
export interface Foo { x }
|
||||
|
||||
// @filename: file2.ts
|
||||
export * from "file1"
|
||||
var x;
|
||||
12
tests/cases/compiler/exportStarForValues10.ts
Normal file
12
tests/cases/compiler/exportStarForValues10.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// @module: system
|
||||
|
||||
// @filename: file0.ts
|
||||
export var v = 1;
|
||||
|
||||
// @filename: file1.ts
|
||||
export interface Foo { x }
|
||||
|
||||
// @filename: file2.ts
|
||||
export * from "file0";
|
||||
export * from "file1";
|
||||
var x = 1;
|
||||
12
tests/cases/compiler/exportStarForValues2.ts
Normal file
12
tests/cases/compiler/exportStarForValues2.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// @module: amd
|
||||
|
||||
// @filename: file1.ts
|
||||
export interface Foo { x }
|
||||
|
||||
// @filename: file2.ts
|
||||
export * from "file1"
|
||||
var x = 1;
|
||||
|
||||
// @filename: file3.ts
|
||||
export * from "file2"
|
||||
var x = 1;
|
||||
24
tests/cases/compiler/exportStarForValues3.ts
Normal file
24
tests/cases/compiler/exportStarForValues3.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
// @module: amd
|
||||
|
||||
// @filename: file1.ts
|
||||
export interface Foo { x }
|
||||
|
||||
// @filename: file2.ts
|
||||
export interface A { x }
|
||||
export * from "file1"
|
||||
var x = 1;
|
||||
|
||||
// @filename: file3.ts
|
||||
export interface B { x }
|
||||
export * from "file1"
|
||||
var x = 1;
|
||||
|
||||
// @filename: file4.ts
|
||||
export interface C { x }
|
||||
export * from "file2"
|
||||
export * from "file3"
|
||||
var x = 1;
|
||||
|
||||
// @filename: file5.ts
|
||||
export * from "file4"
|
||||
var x = 1;
|
||||
15
tests/cases/compiler/exportStarForValues4.ts
Normal file
15
tests/cases/compiler/exportStarForValues4.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// @module: amd
|
||||
|
||||
// @filename: file1.ts
|
||||
export interface Foo { x }
|
||||
|
||||
// @filename: file2.ts
|
||||
export interface A { x }
|
||||
export * from "file1"
|
||||
export * from "file3"
|
||||
var x = 1;
|
||||
|
||||
// @filename: file3.ts
|
||||
export interface B { x }
|
||||
export * from "file2"
|
||||
var x = 1;
|
||||
8
tests/cases/compiler/exportStarForValues5.ts
Normal file
8
tests/cases/compiler/exportStarForValues5.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
// @module: amd
|
||||
|
||||
// @filename: file1.ts
|
||||
export interface Foo { x }
|
||||
|
||||
// @filename: file2.ts
|
||||
export * from "file1"
|
||||
export var x;
|
||||
8
tests/cases/compiler/exportStarForValues6.ts
Normal file
8
tests/cases/compiler/exportStarForValues6.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
// @module: system
|
||||
|
||||
// @filename: file1.ts
|
||||
export interface Foo { x }
|
||||
|
||||
// @filename: file2.ts
|
||||
export * from "file1"
|
||||
export var x = 1;
|
||||
12
tests/cases/compiler/exportStarForValues7.ts
Normal file
12
tests/cases/compiler/exportStarForValues7.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
// @module: amd
|
||||
|
||||
// @filename: file1.ts
|
||||
export interface Foo { x }
|
||||
|
||||
// @filename: file2.ts
|
||||
export * from "file1"
|
||||
export var x = 1;
|
||||
|
||||
// @filename: file3.ts
|
||||
export * from "file2"
|
||||
export var x = 1;
|
||||
24
tests/cases/compiler/exportStarForValues8.ts
Normal file
24
tests/cases/compiler/exportStarForValues8.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
// @module: amd
|
||||
|
||||
// @filename: file1.ts
|
||||
export interface Foo { x }
|
||||
|
||||
// @filename: file2.ts
|
||||
export interface A { x }
|
||||
export * from "file1"
|
||||
export var x = 1;
|
||||
|
||||
// @filename: file3.ts
|
||||
export interface B { x }
|
||||
export * from "file1"
|
||||
export var x = 1;
|
||||
|
||||
// @filename: file4.ts
|
||||
export interface C { x }
|
||||
export * from "file2"
|
||||
export * from "file3"
|
||||
export var x = 1;
|
||||
|
||||
// @filename: file5.ts
|
||||
export * from "file4"
|
||||
export var x = 1;
|
||||
15
tests/cases/compiler/exportStarForValues9.ts
Normal file
15
tests/cases/compiler/exportStarForValues9.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
// @module: amd
|
||||
|
||||
// @filename: file1.ts
|
||||
export interface Foo { x }
|
||||
|
||||
// @filename: file2.ts
|
||||
export interface A { x }
|
||||
export * from "file1"
|
||||
export * from "file3"
|
||||
export var x = 1;
|
||||
|
||||
// @filename: file3.ts
|
||||
export interface B { x }
|
||||
export * from "file2"
|
||||
export var x = 1;
|
||||
8
tests/cases/compiler/exportStarForValuesInSystem.ts
Normal file
8
tests/cases/compiler/exportStarForValuesInSystem.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
// @module: system
|
||||
|
||||
// @filename: file1.ts
|
||||
export interface Foo { x }
|
||||
|
||||
// @filename: file2.ts
|
||||
export * from "file1"
|
||||
var x = 1;
|
||||
Reference in New Issue
Block a user