forked from microsoft/TypeScript
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathnoInferUnionExcessPropertyCheck1.symbols
More file actions
89 lines (70 loc) · 4.01 KB
/
Copy pathnoInferUnionExcessPropertyCheck1.symbols
File metadata and controls
89 lines (70 loc) · 4.01 KB
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
//// [tests/cases/compiler/noInferUnionExcessPropertyCheck1.ts] ////
=== noInferUnionExcessPropertyCheck1.ts ===
declare function test1<T extends { x: string }>(
>test1 : Symbol(test1, Decl(noInferUnionExcessPropertyCheck1.ts, 0, 0))
>T : Symbol(T, Decl(noInferUnionExcessPropertyCheck1.ts, 0, 23))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 0, 34))
a: T,
>a : Symbol(a, Decl(noInferUnionExcessPropertyCheck1.ts, 0, 48))
>T : Symbol(T, Decl(noInferUnionExcessPropertyCheck1.ts, 0, 23))
b: NoInfer<T> | (() => NoInfer<T>),
>b : Symbol(b, Decl(noInferUnionExcessPropertyCheck1.ts, 1, 7))
>NoInfer : Symbol(NoInfer, Decl(lib.es5.d.ts, --, --))
>T : Symbol(T, Decl(noInferUnionExcessPropertyCheck1.ts, 0, 23))
>NoInfer : Symbol(NoInfer, Decl(lib.es5.d.ts, --, --))
>T : Symbol(T, Decl(noInferUnionExcessPropertyCheck1.ts, 0, 23))
): void;
test1({ x: "foo" }, { x: "bar" }); // no error
>test1 : Symbol(test1, Decl(noInferUnionExcessPropertyCheck1.ts, 0, 0))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 5, 7))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 5, 21))
test1({ x: "foo" }, { x: "bar", y: 42 }); // epc error
>test1 : Symbol(test1, Decl(noInferUnionExcessPropertyCheck1.ts, 0, 0))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 6, 7))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 6, 21))
>y : Symbol(y, Decl(noInferUnionExcessPropertyCheck1.ts, 6, 31))
declare function test2<T extends { x: string }>(
>test2 : Symbol(test2, Decl(noInferUnionExcessPropertyCheck1.ts, 6, 41))
>T : Symbol(T, Decl(noInferUnionExcessPropertyCheck1.ts, 8, 23))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 8, 34))
a: T,
>a : Symbol(a, Decl(noInferUnionExcessPropertyCheck1.ts, 8, 48))
>T : Symbol(T, Decl(noInferUnionExcessPropertyCheck1.ts, 8, 23))
b: NoInfer<T> | NoInfer<() => T>,
>b : Symbol(b, Decl(noInferUnionExcessPropertyCheck1.ts, 9, 7))
>NoInfer : Symbol(NoInfer, Decl(lib.es5.d.ts, --, --))
>T : Symbol(T, Decl(noInferUnionExcessPropertyCheck1.ts, 8, 23))
>NoInfer : Symbol(NoInfer, Decl(lib.es5.d.ts, --, --))
>T : Symbol(T, Decl(noInferUnionExcessPropertyCheck1.ts, 8, 23))
): void;
test2({ x: "foo" }, { x: "bar" }); // no error
>test2 : Symbol(test2, Decl(noInferUnionExcessPropertyCheck1.ts, 6, 41))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 13, 7))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 13, 21))
test2({ x: "foo" }, { x: "bar", y: 42 }); // epc error
>test2 : Symbol(test2, Decl(noInferUnionExcessPropertyCheck1.ts, 6, 41))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 14, 7))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 14, 21))
>y : Symbol(y, Decl(noInferUnionExcessPropertyCheck1.ts, 14, 31))
declare function test3<T extends { x: string }>(
>test3 : Symbol(test3, Decl(noInferUnionExcessPropertyCheck1.ts, 14, 41))
>T : Symbol(T, Decl(noInferUnionExcessPropertyCheck1.ts, 16, 23))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 16, 34))
a: T,
>a : Symbol(a, Decl(noInferUnionExcessPropertyCheck1.ts, 16, 48))
>T : Symbol(T, Decl(noInferUnionExcessPropertyCheck1.ts, 16, 23))
b: NoInfer<T | (() => T)>,
>b : Symbol(b, Decl(noInferUnionExcessPropertyCheck1.ts, 17, 7))
>NoInfer : Symbol(NoInfer, Decl(lib.es5.d.ts, --, --))
>T : Symbol(T, Decl(noInferUnionExcessPropertyCheck1.ts, 16, 23))
>T : Symbol(T, Decl(noInferUnionExcessPropertyCheck1.ts, 16, 23))
): void;
test3({ x: "foo" }, { x: "bar" }); // no error
>test3 : Symbol(test3, Decl(noInferUnionExcessPropertyCheck1.ts, 14, 41))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 21, 7))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 21, 21))
test3({ x: "foo" }, { x: "bar", y: 42 }); // epc error
>test3 : Symbol(test3, Decl(noInferUnionExcessPropertyCheck1.ts, 14, 41))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 22, 7))
>x : Symbol(x, Decl(noInferUnionExcessPropertyCheck1.ts, 22, 21))
>y : Symbol(y, Decl(noInferUnionExcessPropertyCheck1.ts, 22, 31))