kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/typescript/testdata/expression.ts (about) 1 export {} 2 3 //- @x defines/binding X 4 //- X.node/kind variable 5 let x = 3; 6 //- @x ref X 7 x++; 8 9 // Check that we index variable initializers: 10 //- @x ref X 11 let y = x + 3; 12 13 // Check indexing through object literal values. 14 { 15 // TODO: - @age defines/binding Age 16 //- @obj defines/binding _Obj 17 //- @x ref X 18 let obj = {age: x}; 19 20 // TODO: - @age ref Age 21 //- @destructure defines/binding Destructure 22 let {age: destructure} = obj; 23 24 //- @destructure ref Destructure 25 destructure; 26 } 27 28 // TODO: test array destructuring. 29 // It currently doesn't work because we need to alter the tsconfig to bring 30 // in [Symbol.iterator] I think. 31 32 // Verify we don't crash on "undefined", which is special in that it is 33 // allowed to refer to nothing. 34 let undef = undefined;