Questions tagged rxjs7

Explore the latest questions and answers asked by our top developers.

How to chain api calls using rxjs?

I understand that there are lot of questions on the title’s subject but I wasn’t able to find clear and concise question/response that would help me with following. Assume we have x amount of web api calls that return observables Observable<cs[]>… See init() { this.service.serviceA().subscribe({ next: (as) => { this.as = as; this.service.serviceB().subscribe({ next: (bs) […]

By krul
Published
Categorized as angular, angular13, rxjs, rxjs7 Tagged , , ,

isIterable and isPromise in rxjs7

In rxjs 6 I used to: import { isIterable, isPromise } from ‘rxjs/internal-compatibility’; With rxjs 7 I get: Error: Module not found: Error: Package path ./internal-compatibility is not exported from package …/node_modules/rxjs (see exports field in …/node_modules/rxjs/package.json) how can I use isPromise and isIterable in rxjs? they seem to be no longer exported, however they […]

By Francesco Borzi
Published
Categorized as angular, rxjs, rxjs7, typescript Tagged , , ,

Can´t recognize rxjs 7 on angular project

In my service.ts import {Observable} from ‘rxjs’; import {map} from ‘rxjs/operators’; import { HttpClient } from ‘@angular/common/http’; import { Expense } from ‘../models/expense’; @Injectable({ providedIn: ‘root’ }) export class ExpenseService { private getUrl: string = "http://localhost:8080/api/v1/expenses"; constructor(private _httpClient: HttpClient) { } getExpenses(): Observable<Expense[]> { return this._httpClient.get<Expense[]>(this.getUrl).pipe( map(response => response) ) } } And in my […]

By Jo o Marques
Published
Categorized as angular, rxjs, rxjs7 Tagged , ,

How to set a timeout config for lastValueFrom() using RxJS 7 in Angular 13?

Quote from RxJS dev team: To fix all these issues, we decided to deprecate toPromise(), and to introduce the two new helper functions for conversion to Promises. Use one of the two new functions As a replacement to the deprecated toPromise() method, you should use one of the two built in static conversion functions firstValueFrom […]

By Matthew
Published
Categorized as angular, angular13, rxjs, rxjs7, typescript Tagged , , , ,

NestJS. TS7016: Could not find a declaration file for module ‘rxjs’

TS7016: Could not find a declaration file for module ‘rxjs’.’C:/Path/to/project/node_modules/rxjs/dist/cjs/index.js’ implicitly has an ‘any’ type. Try npm i –save-dev @types/rxjs if it exists or add a new declaration (.d.ts) file containing `declare module ‘rxjs’; I have updated NestJs to version 8 and rxjs to 7. After that, imports stopped working. There was an index.ts file […]

By
Published
Categorized as angular, rxjs, rxjs7, typescript Tagged , , ,

Module not found: Error: Package path ./index is not exported from package node_modules/rxjs (see exports field in /node_modules/rxjs/package.json)

I am trying RxJs7 in my angular 12.2.0 project and it seems like the path of rxjs operator and method changed. I am getting the below error ./dist/candypal/website/fesm2015/candypal-website.js:8:0-50 – Error: Module not found: Error: Package path ./index is not exported from package /Users/aniruddh/aniruddh/develop/experiment/candypal/node_modules/rxjs (see exports field in /Users/aniruddh/aniruddh/develop/experiment/candypal/node_modules/rxjs/package.json) Note that the above error is coming […]

By Aniruddha Das
Published
Categorized as angular, angular12, rxjs, rxjs7 Tagged , , ,

RXJS 7 – TS2693: ‘AjaxDirection’ only refers to a type, but is being used as a value here

I upgraded my angular 11 projects RxJS 7 and in web storm it suggested me to change some Subject imports, Once I update these imports I am getting below error ERROR: node_modules/rxjs/dist/types/internal/ajax/types.d.ts:9:40 – error TS1110: Type expected. 9 export declare type AjaxResponseType = `${AjaxDirection}_${ProgressEventType}`; ~~~ node_modules/rxjs/dist/types/internal/ajax/types.d.ts:9:43 – error TS2693: ‘AjaxDirection’ only refers to a type, […]

By Aniruddha Das
Published
Categorized as angular, rxjs, rxjs7 Tagged , ,

TS7016: Could not find a declaration file for module ‘rxjs’

I have upgraded my Angular App dependency and successfully installed them. Unfortunately I am now unable to use ‘rxjs’. Below is the error returned by the IDE. TS7016: Could not find a declaration file for module ‘rxjs’.’C:/Path/to/project/node_modules/rxjs/dist/cjs/index.js’ implicitly has an ‘any’ type.   Try npm i –save-dev @types/rxjs if it exists or add a new declaration […]

By Owen Kelvin
Published
Categorized as angular, npm, rxjs, rxjs7, typescript Tagged , , , ,

Still Have Questions?


Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us
faq