mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
62 lines
3.3 KiB
Plaintext
62 lines
3.3 KiB
Plaintext
//// [tests/cases/conformance/es6/destructuring/destructuringParameterProperties5.ts] ////
|
|
|
|
=== destructuringParameterProperties5.ts ===
|
|
type ObjType1 = { x: number; y: string; z: boolean }
|
|
>ObjType1 : Symbol(ObjType1, Decl(destructuringParameterProperties5.ts, 0, 0))
|
|
>x : Symbol(x, Decl(destructuringParameterProperties5.ts, 0, 17))
|
|
>y : Symbol(y, Decl(destructuringParameterProperties5.ts, 0, 28))
|
|
>z : Symbol(z, Decl(destructuringParameterProperties5.ts, 0, 39))
|
|
|
|
type TupleType1 = [ObjType1, number, string]
|
|
>TupleType1 : Symbol(TupleType1, Decl(destructuringParameterProperties5.ts, 0, 52))
|
|
>ObjType1 : Symbol(ObjType1, Decl(destructuringParameterProperties5.ts, 0, 0))
|
|
|
|
class C1 {
|
|
>C1 : Symbol(C1, Decl(destructuringParameterProperties5.ts, 1, 44))
|
|
|
|
constructor(public [{ x1, x2, x3 }, y, z]: TupleType1) {
|
|
>x1 : Symbol(x1, Decl(destructuringParameterProperties5.ts, 4, 25))
|
|
>x2 : Symbol(x2, Decl(destructuringParameterProperties5.ts, 4, 29))
|
|
>x3 : Symbol(x3, Decl(destructuringParameterProperties5.ts, 4, 33))
|
|
>y : Symbol(y, Decl(destructuringParameterProperties5.ts, 4, 39))
|
|
>z : Symbol(z, Decl(destructuringParameterProperties5.ts, 4, 42))
|
|
>TupleType1 : Symbol(TupleType1, Decl(destructuringParameterProperties5.ts, 0, 52))
|
|
|
|
var foo: any = x1 || x2 || x3 || y || z;
|
|
>foo : Symbol(foo, Decl(destructuringParameterProperties5.ts, 5, 11))
|
|
>x1 : Symbol(x1, Decl(destructuringParameterProperties5.ts, 4, 25))
|
|
>x2 : Symbol(x2, Decl(destructuringParameterProperties5.ts, 4, 29))
|
|
>x3 : Symbol(x3, Decl(destructuringParameterProperties5.ts, 4, 33))
|
|
>y : Symbol(y, Decl(destructuringParameterProperties5.ts, 4, 39))
|
|
>z : Symbol(z, Decl(destructuringParameterProperties5.ts, 4, 42))
|
|
|
|
var bar: any = this.x1 || this.x2 || this.x3 || this.y || this.z;
|
|
>bar : Symbol(bar, Decl(destructuringParameterProperties5.ts, 6, 11))
|
|
>this : Symbol(C1, Decl(destructuringParameterProperties5.ts, 1, 44))
|
|
>this : Symbol(C1, Decl(destructuringParameterProperties5.ts, 1, 44))
|
|
>this : Symbol(C1, Decl(destructuringParameterProperties5.ts, 1, 44))
|
|
>this : Symbol(C1, Decl(destructuringParameterProperties5.ts, 1, 44))
|
|
>this : Symbol(C1, Decl(destructuringParameterProperties5.ts, 1, 44))
|
|
}
|
|
}
|
|
|
|
var a = new C1([{ x1: 10, x2: "", x3: true }, "", false]);
|
|
>a : Symbol(a, Decl(destructuringParameterProperties5.ts, 10, 3))
|
|
>C1 : Symbol(C1, Decl(destructuringParameterProperties5.ts, 1, 44))
|
|
>x1 : Symbol(x1, Decl(destructuringParameterProperties5.ts, 10, 17))
|
|
>x2 : Symbol(x2, Decl(destructuringParameterProperties5.ts, 10, 25))
|
|
>x3 : Symbol(x3, Decl(destructuringParameterProperties5.ts, 10, 33))
|
|
|
|
var [a_x1, a_x2, a_x3, a_y, a_z] = [a.x1, a.x2, a.x3, a.y, a.z];
|
|
>a_x1 : Symbol(a_x1, Decl(destructuringParameterProperties5.ts, 11, 5))
|
|
>a_x2 : Symbol(a_x2, Decl(destructuringParameterProperties5.ts, 11, 10))
|
|
>a_x3 : Symbol(a_x3, Decl(destructuringParameterProperties5.ts, 11, 16))
|
|
>a_y : Symbol(a_y, Decl(destructuringParameterProperties5.ts, 11, 22))
|
|
>a_z : Symbol(a_z, Decl(destructuringParameterProperties5.ts, 11, 27))
|
|
>a : Symbol(a, Decl(destructuringParameterProperties5.ts, 10, 3))
|
|
>a : Symbol(a, Decl(destructuringParameterProperties5.ts, 10, 3))
|
|
>a : Symbol(a, Decl(destructuringParameterProperties5.ts, 10, 3))
|
|
>a : Symbol(a, Decl(destructuringParameterProperties5.ts, 10, 3))
|
|
>a : Symbol(a, Decl(destructuringParameterProperties5.ts, 10, 3))
|
|
|