/
modules.spec.ts.snap
64 lines (57 loc) · 1.1 KB
/
modules.spec.ts.snap
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`should handle module 1`] = `
"declare module \\"test\\" {
declare export type Test = \\"ok\\" | \\"error\\";
declare type Test2 = \\"ok\\" | \\"error\\";
declare type Maybe<T> =
| {
type: \\"just\\",
value: T,
...
}
| {
type: \\"nothing\\",
...
};
declare export type Ref<T> = {
current: T,
...
};
declare export var ok: number;
}
"
`;
exports[`should handle module function merging 1`] = `
"declare module \\"test\\" {
declare function test(err: number): void;
declare function test(response: string): string;
}
"
`;
exports[`should handle module merging 1`] = `
"declare module \\"test\\" {
declare interface A {
bar: string;
baz: string;
}
declare export var ok: number;
declare export var error: string;
}
"
`;
exports[`should not merge distinct modules 1`] = `
"declare module \\"A\\" {
declare export interface A {
foo: string;
}
}
declare module \\"B\\" {
declare export interface A {
baz: string;
}
}
export interface A {
bar: string;
}
"
`;