Skip to content

Commit bbc3115

Browse files
committed
test: update snapshot
1 parent 6363c8a commit bbc3115

File tree

13 files changed

+216
-40
lines changed

13 files changed

+216
-40
lines changed
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Index: diff.patch
2+
===================================================================
3+
--- diff.patch
4+
+++ diff.patch
5+
@@ -1,14 +1,25 @@
6+
// index.d.ts
7+
+type __defProp = Object.defineProperty
8+
+type __export = (target, all) => {
9+
+ for (var name in all) __defProp(target, name, {
10+
+ get: all[name],
11+
+ enumerable: true
12+
+ });
13+
+}
14+
+type settings_d_exports = {}
15+
+__export(settings_d_exports, {
16+
+ In: () => In,
17+
+ Out: () => Out
18+
+});
19+
declare type In = { a: string };
20+
declare type Out = { b: number };
21+
declare const config: {
22+
- normalize: (inVar: In) => Out;
23+
+ normalize: (inVar: settings_d_exports.In) => settings_d_exports.Out;
24+
};
25+
declare const options: {
26+
- normalize: (inVar: In) => Out;
27+
+ normalize: (inVar: settings_d_exports.In) => settings_d_exports.Out;
28+
};
29+
declare const params: {
30+
- normalize: (inVar: In) => Out;
31+
+ normalize: (inVar: settings_d_exports.In) => settings_d_exports.Out;
32+
};
33+
-export { config, options, params };
34+
-export { In, Out };
35+
+export { In, Out, config, options, params };

tests/fixtures/export-multiple-vars/known-diff.patch

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

tests/fixtures/export-multiple-vars/snapshot.d.ts

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,34 @@
11
// index.d.ts
22

3+
//#region rolldown:runtime
4+
type __defProp = Object.defineProperty
5+
type __export = (target, all) => {
6+
for (var name in all) __defProp(target, name, {
7+
get: all[name],
8+
enumerable: true
9+
});
10+
}
11+
12+
//#endregion
313
//#region tests/fixtures/export-multiple-vars/settings.d.ts
14+
type settings_d_exports = {}
15+
__export(settings_d_exports, {
16+
In: () => In,
17+
Out: () => Out
18+
});
419
declare type In = { a: string };
520
declare type Out = { b: number };
621

722
//#endregion
823
//#region tests/fixtures/export-multiple-vars/util.d.ts
924
declare const config: {
10-
normalize: (inVar: In) => Out;
25+
normalize: (inVar: settings_d_exports.In) => settings_d_exports.Out;
1126
};
1227
declare const options: {
13-
normalize: (inVar: In) => Out;
28+
normalize: (inVar: settings_d_exports.In) => settings_d_exports.Out;
1429
};
1530
declare const params: {
16-
normalize: (inVar: In) => Out;
31+
normalize: (inVar: settings_d_exports.In) => settings_d_exports.Out;
1732
};
1833

1934
//#endregion

tests/fixtures/inline-import-external-namespace/diff.patch

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

tests/fixtures/inline-import-external-namespace/snapshot.d.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
// index.d.ts
2+
import * as foo from "foo";
23

34
//#region tests/fixtures/inline-import-external-namespace/index.d.ts
45
interface Foo {
5-
ns1: import("foo");
6-
ns2: typeof import("foo");
6+
ns1: foo;
7+
ns2: typeof foo;
78
}
89

910
//#endregion
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
Index: diff.patch
2+
===================================================================
3+
--- diff.patch
4+
+++ diff.patch
5+
@@ -1,8 +1,17 @@
6+
// index.d.ts
7+
+type __defProp = Object.defineProperty
8+
+type __export = (target, all) => {
9+
+ for (var name in all) __defProp(target, name, {
10+
+ get: all[name],
11+
+ enumerable: true
12+
+ });
13+
+}
14+
+type bar_d_exports = {}
15+
+__export(bar_d_exports, { Bar: () => Bar });
16+
interface Bar<T> {
17+
t: T;
18+
}
19+
interface Foo {
20+
- bar: Bar<number>;
21+
+ bar: bar_d_exports.Bar<number>;
22+
}
23+
export { Foo };

tests/fixtures/inline-import-generic/snapshot.d.ts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
11
// index.d.ts
22

3+
//#region rolldown:runtime
4+
type __defProp = Object.defineProperty
5+
type __export = (target, all) => {
6+
for (var name in all) __defProp(target, name, {
7+
get: all[name],
8+
enumerable: true
9+
});
10+
}
11+
12+
//#endregion
313
//#region tests/fixtures/inline-import-generic/bar.d.ts
14+
type bar_d_exports = {}
15+
__export(bar_d_exports, { Bar: () => Bar });
416
interface Bar<T> {
517
t: T;
618
}
719

820
//#endregion
921
//#region tests/fixtures/inline-import-generic/index.d.ts
1022
interface Foo {
11-
bar: Bar<number>;
23+
bar: bar_d_exports.Bar<number>;
1224
}
1325

1426
//#endregion

tests/fixtures/inline-import-namespace/diff.patch

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,22 @@ Index: diff.patch
22
===================================================================
33
--- diff.patch
44
+++ diff.patch
5-
@@ -1,14 +1,5 @@
5+
@@ -1,14 +1,19 @@
66
// index.d.ts
7-
-declare class Bar {}
8-
-interface IBar {}
7+
+type __defProp = Object.defineProperty
8+
+type __export = (target, all) => {
9+
+ for (var name in all) __defProp(target, name, {
10+
+ get: all[name],
11+
+ enumerable: true
12+
+ });
13+
+}
14+
+type bar_d_exports = {}
15+
+__export(bar_d_exports, {
16+
+ Bar: () => Bar,
17+
+ IBar: () => IBar
18+
+});
19+
declare class Bar {}
20+
interface IBar {}
921
-type __bar_Bar = Bar;
1022
-declare const __bar_Bar: typeof Bar;
1123
-type __bar_IBar = IBar;
@@ -15,6 +27,6 @@ Index: diff.patch
1527
-}
1628
interface Foo {
1729
- ns: typeof __bar;
18-
+ ns: typeof import("./bar");
30+
+ ns: typeof bar_d_exports;
1931
}
2032
export { Foo };

tests/fixtures/inline-import-namespace/snapshot.d.ts

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
11
// index.d.ts
22

3+
//#region rolldown:runtime
4+
type __defProp = Object.defineProperty
5+
type __export = (target, all) => {
6+
for (var name in all) __defProp(target, name, {
7+
get: all[name],
8+
enumerable: true
9+
});
10+
}
11+
12+
//#endregion
13+
//#region tests/fixtures/inline-import-namespace/bar.d.ts
14+
type bar_d_exports = {}
15+
__export(bar_d_exports, {
16+
Bar: () => Bar,
17+
IBar: () => IBar
18+
});
19+
declare class Bar {}
20+
interface IBar {}
21+
22+
//#endregion
323
//#region tests/fixtures/inline-import-namespace/index.d.ts
424
interface Foo {
5-
ns: typeof import("./bar");
25+
ns: typeof bar_d_exports;
626
}
727

828
//#endregion
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
Index: diff.patch
2+
===================================================================
3+
--- diff.patch
4+
+++ diff.patch
5+
@@ -1,8 +1,20 @@
6+
// index.d.ts
7+
+type __defProp = Object.defineProperty
8+
+type __export = (target, all) => {
9+
+ for (var name in all) __defProp(target, name, {
10+
+ get: all[name],
11+
+ enumerable: true
12+
+ });
13+
+}
14+
+type bar_d_exports = {}
15+
+__export(bar_d_exports, {
16+
+ Bar: () => Bar,
17+
+ Baz: () => Baz
18+
+});
19+
interface Bar {}
20+
declare const Baz = 123;
21+
interface Foo {
22+
- bar: Bar;
23+
- baz: typeof Baz;
24+
+ bar: bar_d_exports.Bar;
25+
+ baz: typeof bar_d_exports.Baz;
26+
}
27+
export { Foo };

0 commit comments

Comments
 (0)