Skip to content

Commit 6cafa75

Browse files
committed
test: add test suite from rollup-plugin-dts
1 parent dadd976 commit 6cafa75

File tree

432 files changed

+4042
-61
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

432 files changed

+4042
-61
lines changed

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,3 @@ dist
44
*.log
55
.DS_Store
66
.eslintcache
7-
8-
tests/fixtures/local
9-
tests/fixtures/fails

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ npm i https://pkg.pr.new/sxzz/rolldown-plugin-dts@main
1515

1616
## Credits
1717

18-
The project draws inspiration from [rollup-plugin-dts](https://github.com/Swatinem/rollup-plugin-dts)
19-
but is an independent implementation.
20-
Special thanks to the original creators for their valuable work.
18+
The project is inspired by [rollup-plugin-dts](https://github.com/Swatinem/rollup-plugin-dts)
19+
but has been independently implemented.
20+
We extend our gratitude to the original creators for their contributions.
21+
Furthermore, the test suite is authorized by them and distributed under the MIT license.
2122

2223
## Sponsors
2324

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
export interface I {
2+
(arg: string): string;
3+
staticProp: string;
4+
}
5+
export declare const fn: {
6+
(arg: string): string;
7+
staticProp: string;
8+
};
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Index: diff.patch
2+
===================================================================
3+
--- diff.patch
4+
+++ diff.patch
5+
@@ -6,6 +6,5 @@
6+
declare const fn: {
7+
(arg: string): string;
8+
staticProp: string;
9+
};
10+
-export { fn };
11+
-export { I };
12+
\ No newline at end of file
13+
+export { I, fn };
14+
\ No newline at end of file
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// index.d.ts
2+
3+
//#region tests/fixtures/call-signature/index.d.ts
4+
interface I {
5+
(arg: string): string;
6+
staticProp: string;
7+
}
8+
declare const fn: {
9+
(arg: string): string;
10+
staticProp: string;
11+
};
12+
13+
//#endregion
14+
export { I, fn };
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./b";
2+
export declare class A {}
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from "./a";
2+
export declare class B {}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export { B } from "./a";
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// index.d.ts
2+
3+
//#region tests/fixtures/circular-dependency-star/b.d.ts
4+
declare class B {}
5+
6+
//#endregion
7+
export { B };
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export { B } from "./b";
2+
export declare class A {}

0 commit comments

Comments
 (0)