I want to use destructuring in typescript, sample code:
var {first, second} = { first: "one", second: "two" } console.log(first);
my tsc --t es5 destructuring.ts compilation tsc --t es5 destructuring.ts ,
typescript version 1.6.2 ,
IDE - vs code .
then they cause three errors:
destructuring.ts(1,5): error TS1008: Unexpectedtoken; 'identifier' expected.
destructuring.ts(1,21): error TS1008: Unexpected token; 'module, class, interface, enum, import or statement' expected.
destructuring.ts(1,45): error TS1005: ';' expected. ;
On my desktop (window 8.1 x64), the npm -g list command, show typescript@1.6.2 and the tsc --version show tsc --version Version 1.0.3.0 :

But in my laptop (windows 7 x64) the tsc --version command shows message TS6029: Version 1.6.2 : 
source share