문제
Typescript는 CoffeeScript와 유사한 구조 분해 할당을 지원합니까?
foo = {x: 1, y: 2, z: 3}
{x, z} = foo
# which will yield
x == 1 && z == 3
해결책
다른 팁
예, 이제 ES6 Onwords에서 지원합니다.아래와 같이 브라우저 (ES6) 콘솔 자체의 코드를 테스트 할 수 있습니다.
const user = {name: 'Robkuz', gender: 'Male', looks: 'Great'}
const {name, looks} = user;
. 제휴하지 않습니다 StackOverflow