Cannot find name ‘Let’(TS2304) ,’headers(TS2552)’, ‘options’ errors in typescript

I am a beginner with angular and ionic, I try to follow a tutorial and end up getting these errors.

  • Cannot find name ‘Let’(TS2304)
  • Cannot find name ‘headers’. Did you mean ‘Headers’?(TS2552)
  • Cannot find name ‘options’. Did you mean ‘Option’?(TS2552)

Below is my code for access-providers.ts

import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders, HttpErrorResponse } from '@angular/common/http';
import 'rxjs/add/operator/map';
import 'rxjs/add/operator/timeout';
import { fileURLToPath } from 'url';

@Injectable()
export class AccessProviders {
    //url backend api json
    server: string ='http://localhost/login-register-home/api';

    constructor(public http: HttpClient){}

    postData(body, file){
        Let headers = new HttpHeaders({
            'Content-Type' : 'application/json; charset=UTF-8'
        });
        Let options = {
            headers: headers
        }

        return this.http.post(this.server + file,JSON.stringify(body), options)
        .timeout(59000)// 59 sec timeout
        .map(res => res);
    }
}

Extra info:

  • Angular CLI & Angular: 9.0.7
  • Node: 12.16.1
  • rxjs : 6.5.4
  • typescript : 3.7.5

Can anyone help me out, I’m really clueless. Thank you

Source: New feed
Source Url Cannot find name ‘Let’(TS2304) ,’headers(TS2552)’, ‘options’ errors in typescript