'do' operator not usable in es7 bind syntax
RxJS version: 5
Code to reproduce:
import {do as safeDo} from 'rxjs/operator/do'
Expected behavior: $obs::safeDo(a => console.log(a)
Actual behavior: safeDo is undefined
Additional information:
The usage of the reserved word do is the root of all evil, thus we cannot write:
import {do} from 'rxjs/operator/do'
but rather need to alias it.
Right after this comes the decision to export it as a member and not as default (which would allow client code to import under any name and bypass the issue e.g.
import safeDo from 'rxjs/operator/do'
While the code I use, compiles (webpack2, babel) and should have allowed to overcome the issue
import {do as safeDo} from 'rxjs/operator/do'
It doesn't, since safeDo is undefined.
By the same token, your usage of import {x} from 'rxjs/operator/x also breaks babel plugins like lodash plugins the would allow us to use the shorter code improt {a, b, c, d} from rxjs/operator and still remain with a small code footprint.
I think this is dupe of https://github.com/ReactiveX/rxjs/issues/1958 ?
dup of #1958
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.