Reputation: 1196
Stumbled upon this code:
const { operator } = this;
from https://github.com/ReactiveX/rxjs/blob/master/src/Observable.ts#L89
What does it mean?
Upvotes: 3
Views: 81
Reputation: 11535
It's object destructuring. This
const { operator, other } = this;
is equivalent to
const operator = this.operator;
const other = this.other;
It's borrowed from ES6, which has the same feature.
Upvotes: 4