CoffeeScript benzer destek strüktür atamaları typescript olacak mı?
foo = {x: 1, y: 2, z: 3}
{x, z} = foo
# which will yield
x == 1 && z == 3
CoffeeScript benzer destek strüktür atamaları typescript olacak mı?
foo = {x: 1, y: 2, z: 3}
{x, z} = foo
# which will yield
x == 1 && z == 3
Evet, olacak.
Onların hata izci bu sorunu bakınız: http://typescript.codeplex.com/workitem/15
UPDATE: Bu artık destekleniyor.
Evet şimdi itibaren ES6 gelen destekler. Sen (ES6 destekler) tarayıcınızda kod aşağıda kendisini teselli test edebilirsiniz.
const user = {name: 'Robkuz', gender: 'Male', looks: 'Great'}
const {name, looks} = user;