Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document says that Observable has let operator as default but not in implementation #3337

Closed
berlysia opened this issue Feb 21, 2018 · 4 comments

Comments

@berlysia
Copy link

RxJS version:
v5.5, v6

Code to reproduce:
with v6.0.0-alpha.3:

require('rxjs/index').Observable.create().let(x => x);
require('rxjs/index').Observable.create().pipe(x => x);

in v5.5, replace 'rxjs/index' with 'rxjs/Observable'

Expected behavior:
same result

ref. doc/pipeable-operators.md

The let operator is now part of Observable as pipe and cannot be imported.

Actual behavior:

require('rxjs/index').Observable.create().let(x => x); // let is not a function
require('rxjs/index').Observable.create().pipe(x => x); // properly works

Which is correct, implementation or document?

@dengwanc
Copy link

dengwanc commented Mar 6, 2018

did U sure create() is OK ?

THIS IS MY CODE
node v7
rxjs v6 aplha

const { Observable, Subject, ReplaySubject } = require('rxjs');
const log = x => console.log(x);

Observable.of(1)
    .let(x => x)
    .subscribe(log);

@berlysia
Copy link
Author

berlysia commented Mar 7, 2018

RxJS v6.0.0-alpha3 has a problem about main field of package.json.
This problem causes the constructor of Observable imported by require('rxjs') is patched all of operators, and this problem is fixed in #3316.

FYI: src/internal/Observable.ts does not have let operator, but has pipe operator.

@benlesh
Copy link
Member

benlesh commented Mar 15, 2018

The current docs are for v5... in v6 let is just pipe with one argument.

@benlesh benlesh closed this as completed Mar 15, 2018
@lock
Copy link

lock bot commented Jun 5, 2018

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.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants