Skip to content

Add RxJs #511

Description

@polRk

Я предлагаю добавить возможность работать с Observeble.
I suggest adding the ability to work with Observeble.

import {from, of} from 'rxjs'
from(firestore.collection('col')).pipe(
map(col => col.docs),
take(1),
mergeMap(doc => of(doc.update()))
tap(console.log)
)
firestore.pipe(
map(col => col.docs),
take(1),
mergeMap(doc => of(doc.update()))
tap(console.log)
)

Now i can use rxjs wrapper, but it's not cool

fromPromise(firestore.collection('col'))
// or
new Observable(observer => {
firestore.collection('col').get().then(r => {observer.next(r)}).then(r => observer.close())
}).pipe(
map(col => col.docs),
take(1),
mergeMap(doc => of(doc.update()))
tap(console.log)
)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions