title: Typescript equality always false even though value is true
body: <p>I'd developed one simple typescript to compare the value passing from the drop down value.</p>
  
  <p>Kindly see my code below</p>
  
  <p>Even though the value = 'Supervisor', the selection always goes to else method. </p>
  
  <pre><code>updateFilter(value: string): void {
  // value = 'Supervisor'
  if (value === 'Supervisor') {
    this.loading = true;
    this._dashboardservice.getAllSupervisor().subscribe(
      resp =&gt; {
        this.loading = false;
        this.listofmodules = Module [resp.length];
        this.listofmodules = resp;
      }
    );
  } else {
    this._nzMessage.create('error', 'Only Supervisor are allowed at the moment');
  }}
  </code></pre>
  
  <p>But if i change the <code>===</code> to <code>==</code> . Everything is okay, but the IDE prompt me an error <code>== should be === tslint(triple-equals)</code></p>
  
  <p>Any advice is appreciate. Thank you stackoverflow.</p>
  
  <p><strong>UPDATE</strong>
  Try a few more solution. To check whether it the same type or not. But still no luck. Kindly see updated code below</p>
  
  <pre><code>updateFilter(value: string): void {
  console.log('Log value: ' + value);
  
  let tempvalue: string;
  tempvalue = 'Supervisor';
  
  if (value === tempvalue) {
    this.loading = true;
    this._dashboardservice.getAllSupervisor().subscribe(
      resp =&gt; {
        this.loading = false;
        this.listofmodules = Module [resp.length];
        this.listofmodules = resp;
      }
    );
  } else {
    this._nzMessage.create('error', 'Only Supervisor are allowed at the moment');
  }}
  </code></pre>
  
  <p>Even the <code>console.log('Log value: ' + value);</code> showing <code>Log value: Supervisor</code>.</p>
  
  <p><strong>2nd UPDATE</strong> </p>
  
  <p>I try to print the typeof for both value and tempvalue. </p>
  
  <pre><code>value = object
  tempvalue = string
  </code></pre>
  
  <p>why is this happening ? In the beginning of my function, I already state that the <code>value: string</code></p>
  
  <p>Any idea ?</p>