Skip to content

Commit 54e14f6

Browse files
committed
Adds baselines
1 parent 733862e commit 54e14f6

10 files changed

+350
-2
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
//// [tests/cases/conformance/declarationEmit/bundledNodeDTSFailsWithFlag.ts] ////
2+
3+
//// [index.ts]
4+
export * from "./nested";
5+
6+
//// [base.ts]
7+
import { B } from "./shared";
8+
9+
export function f() {
10+
return new B();
11+
}
12+
13+
//// [derived.ts]
14+
import { f } from "./base";
15+
16+
export function g() {
17+
return f();
18+
}
19+
20+
//// [index.ts]
21+
export * from "./base";
22+
export * from "./derived";
23+
export * from "./shared";
24+
25+
//// [shared.ts]
26+
export class B {}
27+
28+
29+
30+
31+
//// [out.d.ts]
32+
declare module "my-pkg/nested/shared" {
33+
export class B {
34+
}
35+
}
36+
declare module "my-pkg/nested/base" {
37+
import { B } from "my-pkg/nested/shared";
38+
export function f(): B;
39+
}
40+
declare module "my-pkg/nested/derived" {
41+
export function g(): import("my-pkg").B;
42+
}
43+
declare module "my-pkg/nested" {
44+
export * from "my-pkg/nested/base";
45+
export * from "my-pkg/nested/derived";
46+
export * from "my-pkg/nested/shared";
47+
}
48+
declare module "my-pkg" {
49+
export * from "my-pkg/nested";
50+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
=== tests/cases/conformance/declarationEmit/index.ts ===
2+
export * from "./nested";
3+
No type information for this code.
4+
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
5+
import { B } from "./shared";
6+
>B : Symbol(B, Decl(base.ts, 0, 8))
7+
8+
export function f() {
9+
>f : Symbol(f, Decl(base.ts, 0, 29))
10+
11+
return new B();
12+
>B : Symbol(B, Decl(base.ts, 0, 8))
13+
}
14+
15+
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
16+
import { f } from "./base";
17+
>f : Symbol(f, Decl(derived.ts, 0, 8))
18+
19+
export function g() {
20+
>g : Symbol(g, Decl(derived.ts, 0, 27))
21+
22+
return f();
23+
>f : Symbol(f, Decl(derived.ts, 0, 8))
24+
}
25+
26+
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
27+
export * from "./base";
28+
No type information for this code.export * from "./derived";
29+
No type information for this code.export * from "./shared";
30+
No type information for this code.
31+
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
32+
export class B {}
33+
>B : Symbol(B, Decl(shared.ts, 0, 0))
34+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
=== tests/cases/conformance/declarationEmit/index.ts ===
2+
export * from "./nested";
3+
No type information for this code.
4+
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
5+
import { B } from "./shared";
6+
>B : typeof B
7+
8+
export function f() {
9+
>f : () => B
10+
11+
return new B();
12+
>new B() : B
13+
>B : typeof B
14+
}
15+
16+
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
17+
import { f } from "./base";
18+
>f : () => import("tests/cases/conformance/declarationEmit/index").B
19+
20+
export function g() {
21+
>g : () => import("tests/cases/conformance/declarationEmit/index").B
22+
23+
return f();
24+
>f() : import("tests/cases/conformance/declarationEmit/index").B
25+
>f : () => import("tests/cases/conformance/declarationEmit/index").B
26+
}
27+
28+
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
29+
export * from "./base";
30+
No type information for this code.export * from "./derived";
31+
No type information for this code.export * from "./shared";
32+
No type information for this code.
33+
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
34+
export class B {}
35+
>B : B
36+

tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ declare module "nested/base" {
4040
declare module "nested/derived" {
4141
export function g(): import("nested").B;
4242
}
43-
declare module "nested/index" {
43+
declare module "nested" {
4444
export * from "nested/base";
4545
export * from "nested/derived";
4646
export * from "nested/shared";
4747
}
4848
declare module "index" {
49-
export * from "nested/index";
49+
export * from "nested";
5050
}
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
//// [tests/cases/conformance/declarationEmit/bundledNodeDTSWithExports.ts] ////
2+
3+
//// [index.ts]
4+
export {}
5+
6+
//// [base.ts]
7+
import { C } from "./";
8+
9+
export function f() {
10+
return new C();
11+
}
12+
13+
//// [derived.ts]
14+
import { f } from "./base";
15+
16+
export function g() {
17+
return f();
18+
}
19+
20+
//// [index.ts]
21+
export * from "./base";
22+
export * from "./derived";
23+
export class C {}
24+
25+
26+
27+
28+
//// [out.d.ts]
29+
declare module "my-pkg" {
30+
export {};
31+
}
32+
declare module "my-pkg/nested/derived" {
33+
export function g(): import("my-pkg/nested").C;
34+
}
35+
declare module "my-pkg/nested" {
36+
export * from "my-pkg/nested/base";
37+
export * from "my-pkg/nested/derived";
38+
export class C {
39+
}
40+
}
41+
declare module "my-pkg/nested/base" {
42+
import { C } from "my-pkg/nested";
43+
export function f(): C;
44+
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
=== tests/cases/conformance/declarationEmit/index.ts ===
2+
export {}
3+
No type information for this code.
4+
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
5+
import { C } from "./";
6+
>C : Symbol(C, Decl(base.ts, 0, 8))
7+
8+
export function f() {
9+
>f : Symbol(f, Decl(base.ts, 0, 23))
10+
11+
return new C();
12+
>C : Symbol(C, Decl(base.ts, 0, 8))
13+
}
14+
15+
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
16+
import { f } from "./base";
17+
>f : Symbol(f, Decl(derived.ts, 0, 8))
18+
19+
export function g() {
20+
>g : Symbol(g, Decl(derived.ts, 0, 27))
21+
22+
return f();
23+
>f : Symbol(f, Decl(derived.ts, 0, 8))
24+
}
25+
26+
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
27+
export * from "./base";
28+
export * from "./derived";
29+
export class C {}
30+
>C : Symbol(C, Decl(index.ts, 1, 26))
31+
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
=== tests/cases/conformance/declarationEmit/index.ts ===
2+
export {}
3+
No type information for this code.
4+
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
5+
import { C } from "./";
6+
>C : typeof C
7+
8+
export function f() {
9+
>f : () => C
10+
11+
return new C();
12+
>new C() : C
13+
>C : typeof C
14+
}
15+
16+
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
17+
import { f } from "./base";
18+
>f : () => import("tests/cases/conformance/declarationEmit/nested/index").C
19+
20+
export function g() {
21+
>g : () => import("tests/cases/conformance/declarationEmit/nested/index").C
22+
23+
return f();
24+
>f() : import("tests/cases/conformance/declarationEmit/nested/index").C
25+
>f : () => import("tests/cases/conformance/declarationEmit/nested/index").C
26+
}
27+
28+
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
29+
export * from "./base";
30+
export * from "./derived";
31+
export class C {}
32+
>C : C
33+
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
//// [tests/cases/conformance/declarationEmit/bundledNodeDTSWithScopedPackage.ts] ////
2+
3+
//// [index.ts]
4+
export * from "./nested";
5+
6+
//// [base.ts]
7+
import { B } from "./shared";
8+
9+
export function f() {
10+
return new B();
11+
}
12+
13+
//// [derived.ts]
14+
import { f } from "./base";
15+
16+
export function g() {
17+
return f();
18+
}
19+
20+
//// [index.ts]
21+
export * from "./base";
22+
export * from "./derived";
23+
export * from "./shared";
24+
25+
//// [shared.ts]
26+
export class B {}
27+
28+
29+
30+
31+
//// [out.d.ts]
32+
declare module "@test/my-pkg/nested/shared" {
33+
export class B {
34+
}
35+
}
36+
declare module "@test/my-pkg/nested/base" {
37+
import { B } from "@test/my-pkg/nested/shared";
38+
export function f(): B;
39+
}
40+
declare module "@test/my-pkg/nested/derived" {
41+
export function g(): import("@test/my-pkg").B;
42+
}
43+
declare module "@test/my-pkg/nested" {
44+
export * from "@test/my-pkg/nested/base";
45+
export * from "@test/my-pkg/nested/derived";
46+
export * from "@test/my-pkg/nested/shared";
47+
}
48+
declare module "@test/my-pkg" {
49+
export * from "@test/my-pkg/nested";
50+
}
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
=== tests/cases/conformance/declarationEmit/index.ts ===
2+
export * from "./nested";
3+
No type information for this code.
4+
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
5+
import { B } from "./shared";
6+
>B : Symbol(B, Decl(base.ts, 0, 8))
7+
8+
export function f() {
9+
>f : Symbol(f, Decl(base.ts, 0, 29))
10+
11+
return new B();
12+
>B : Symbol(B, Decl(base.ts, 0, 8))
13+
}
14+
15+
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
16+
import { f } from "./base";
17+
>f : Symbol(f, Decl(derived.ts, 0, 8))
18+
19+
export function g() {
20+
>g : Symbol(g, Decl(derived.ts, 0, 27))
21+
22+
return f();
23+
>f : Symbol(f, Decl(derived.ts, 0, 8))
24+
}
25+
26+
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
27+
export * from "./base";
28+
No type information for this code.export * from "./derived";
29+
No type information for this code.export * from "./shared";
30+
No type information for this code.
31+
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
32+
export class B {}
33+
>B : Symbol(B, Decl(shared.ts, 0, 0))
34+
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
=== tests/cases/conformance/declarationEmit/index.ts ===
2+
export * from "./nested";
3+
No type information for this code.
4+
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts ===
5+
import { B } from "./shared";
6+
>B : typeof B
7+
8+
export function f() {
9+
>f : () => B
10+
11+
return new B();
12+
>new B() : B
13+
>B : typeof B
14+
}
15+
16+
=== tests/cases/conformance/declarationEmit/nested/derived.ts ===
17+
import { f } from "./base";
18+
>f : () => import("tests/cases/conformance/declarationEmit/index").B
19+
20+
export function g() {
21+
>g : () => import("tests/cases/conformance/declarationEmit/index").B
22+
23+
return f();
24+
>f() : import("tests/cases/conformance/declarationEmit/index").B
25+
>f : () => import("tests/cases/conformance/declarationEmit/index").B
26+
}
27+
28+
=== tests/cases/conformance/declarationEmit/nested/index.ts ===
29+
export * from "./base";
30+
No type information for this code.export * from "./derived";
31+
No type information for this code.export * from "./shared";
32+
No type information for this code.
33+
No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts ===
34+
export class B {}
35+
>B : B
36+

0 commit comments

Comments
 (0)