Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What do the curly braces mean in this variable declaration in TypeScript? [duplicate]

What do the curly braces do here in this variable definition?

const { foo } = this.bar;
like image 709
Gabriel Perry Avatar asked Oct 16 '25 23:10

Gabriel Perry


1 Answers

Javascript destructuring, explained here https://davidwalsh.name/destructuring-alias

like image 96
Alexander.Furer Avatar answered Oct 19 '25 11:10

Alexander.Furer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!