|
1 | 1 | // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html |
2 | 2 |
|
| 3 | +exports[`rollup > autoAddExts 1`] = ` |
| 4 | +"// main.js |
| 5 | +function Component() { |
| 6 | + return /* @__PURE__ */ React.createElement("div", null, "I'm a div in a tsx component!"); |
| 7 | +} |
| 8 | +
|
| 9 | +function hello(s) { |
| 10 | + return "hello" + s; |
| 11 | +} |
| 12 | +let c = Component; |
| 13 | +let num = 1; |
| 14 | +
|
| 15 | +export { c, hello, num }; |
| 16 | +
|
| 17 | +// temp/component.d.ts |
| 18 | +export declare function Component(): React.JSX.Element; |
| 19 | +
|
| 20 | +// temp/main.d.ts |
| 21 | +import { type Num } from '../temp/types.js'; |
| 22 | +export type Str = string; |
| 23 | +export declare function hello(s: Str): Str; |
| 24 | +export declare let c: React.JSX.Element; |
| 25 | +export declare let num: Num; |
| 26 | +
|
| 27 | +// temp/types.d.ts |
| 28 | +import type { Num2 } from '../temp/types2.js'; |
| 29 | +export type Num = Num2; |
| 30 | +
|
| 31 | +// temp/types2.d.ts |
| 32 | +export type Num2 = number; |
| 33 | +" |
| 34 | +`; |
| 35 | + |
3 | 36 | exports[`rollup > custom rewriter 1`] = ` |
4 | 37 | "// index.d.ts |
5 | 38 | export type * from './test.js'; |
@@ -30,14 +63,14 @@ export { c, hello, num }; |
30 | 63 | export declare function Component(): React.JSX.Element; |
31 | 64 |
|
32 | 65 | // temp/main.d.ts |
33 | | -import { type Num } from '../temp/types.js'; |
| 66 | +import { type Num } from '../temp/types'; |
34 | 67 | export type Str = string; |
35 | 68 | export declare function hello(s: Str): Str; |
36 | 69 | export declare let c: React.JSX.Element; |
37 | 70 | export declare let num: Num; |
38 | 71 |
|
39 | 72 | // temp/types.d.ts |
40 | | -import type { Num2 } from '../temp/types2.js'; |
| 73 | +import type { Num2 } from '../temp/types2'; |
41 | 74 | export type Num = Num2; |
42 | 75 |
|
43 | 76 | // temp/types2.d.ts |
|
0 commit comments