How to configure custom global interfaces (.d.ts files) for TypeScript?

“Magically available interfaces” or global types is highly discouraged and should mostly be left to legacy. Also, you should not be using ambient declaration files (e.g. d.ts files) for code that you are writing. These are meant to stand-in the place of external non-typescript code (essentially filling in the typescript types into js code so … Read more

Property ‘map’ does not exist on type ‘Observable’

You need to import the map operator: import ‘rxjs/add/operator/map’ Or more generally: import ‘rxjs/Rx’; Notice: For versions of RxJS 6.x.x and above, you will have to use pipeable operators as shown in the code snippet below: import { map } from ‘rxjs/operators’; import { HttpClient } from ‘@angular/common/http’; // … export class MyComponent { constructor(private … Read more