how to check type of variable in typescript +angular? : <p>could you please tell me  how to check typeof of variable in typescript + angular ?</p>

<pre><code>import { Component } from '@angular/core';

interface Abc {
  name : string
}
@Component({
  selector: 'my-app',
  templateUrl: './app.component.html',
  styleUrls: [ './app.component.css' ]
})
export class AppComponent  {
  name = 'Angular 6';
  a:Abc= {
  name:"sss"
  }

  constructor(){
    console.log(typeof this.a)
   // console.log(this.a instanceof Abc) 
  }
}
</code></pre>

<p>It should give <code>true</code> and <code>false</code></p>

<p><a href="https://stackblitz.com/edit/angular-jfargi?file=src/app/app.component.ts" rel="noreferrer">https://stackblitz.com/edit/angular-jfargi?file=src/app/app.component.ts</a></p>
