Rxjs: export `create` from `rxjs`

Created on 4 May 2018  路  4Comments  路  Source: ReactiveX/rxjs

Currently the only factory method not exported as root from rxjs is Observable.create. I see no reason why this couldn't be the case? For consistency.

e.g.

const { defer, of, timer, Observable } = require('rxjs')

vs

const { defer, of, timer, create } = require('rxjs')
feature

Most helpful comment

I think you're right. Although I think I'd want to just call it observable or the like.

I'd recommend most people just use new Observable, as it's more idiomatic, and is typed better in TypeScript.

All 4 comments

馃憤 This confused me I saw the migration docs imply that they all were removed and it seemed like from was the one to use but it turns out that Observable.create is still around and new Observable is more idiomatic

I think you're right. Although I think I'd want to just call it observable or the like.

I'd recommend most people just use new Observable, as it's more idiomatic, and is typed better in TypeScript.

Links were updated in #3846.

As create is deprecated we can close this issue.
See https://github.com/angular/components/issues/14785

Was this page helpful?
0 / 5 - 0 ratings

Related issues

benmonro picture benmonro  路  32Comments

pleerock picture pleerock  路  31Comments

oskarols picture oskarols  路  32Comments

ababashka picture ababashka  路  37Comments

huineng picture huineng  路  30Comments