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
|
=== tests/cases/compiler/spreadIntersection.ts ===
var intersection: { a: number } & { b: string };
>intersection : Symbol(intersection, Decl(spreadIntersection.ts, 0, 3))
>a : Symbol(a, Decl(spreadIntersection.ts, 0, 19))
>b : Symbol(b, Decl(spreadIntersection.ts, 0, 35))
var o1: { a: number, b: string };
>o1 : Symbol(o1, Decl(spreadIntersection.ts, 2, 3), Decl(spreadIntersection.ts, 3, 3))
>a : Symbol(a, Decl(spreadIntersection.ts, 2, 9))
>b : Symbol(b, Decl(spreadIntersection.ts, 2, 20))
var o1 = { ...intersection };
>o1 : Symbol(o1, Decl(spreadIntersection.ts, 2, 3), Decl(spreadIntersection.ts, 3, 3))
>intersection : Symbol(intersection, Decl(spreadIntersection.ts, 0, 3))
var o2: { a: number, b: string, c: boolean };
>o2 : Symbol(o2, Decl(spreadIntersection.ts, 5, 3), Decl(spreadIntersection.ts, 6, 3))
>a : Symbol(a, Decl(spreadIntersection.ts, 5, 9))
>b : Symbol(b, Decl(spreadIntersection.ts, 5, 20))
>c : Symbol(c, Decl(spreadIntersection.ts, 5, 31))
var o2 = { ...intersection, c: false };
>o2 : Symbol(o2, Decl(spreadIntersection.ts, 5, 3), Decl(spreadIntersection.ts, 6, 3))
>intersection : Symbol(intersection, Decl(spreadIntersection.ts, 0, 3))
>c : Symbol(c, Decl(spreadIntersection.ts, 6, 27))
|