Zal Typescript ondersteuning destructurering opdrachten vergelijkbaar met CoffeeScript?
foo = {x: 1, y: 2, z: 3}
{x, z} = foo
# which will yield
x == 1 && z == 3
Zal Typescript ondersteuning destructurering opdrachten vergelijkbaar met CoffeeScript?
foo = {x: 1, y: 2, z: 3}
{x, z} = foo
# which will yield
x == 1 && z == 3
Ja het zal.
Zie deze kwestie in hun bug tracker: http://typescript.codeplex.com/workitem/15
UPDATE: Dit wordt nu ondersteund.
Ja, het ondersteunen nu uit ES6 en later. U kunt de code in je browser (die ES6 ondersteunt) console zelf, zoals hieronder te testen.
const user = {name: 'Robkuz', gender: 'Male', looks: 'Great'}
const {name, looks} = user;