JS Shapes vs Interface

by Krishna Ananthi

TypeScript

interface Action1 {
  type: string;
}
class NotaString {
  type: string;
  constructor() {
    this.type = 'constructor string';
  }
}
let a:Action1={
	type:'anu'
}
console.log(a);
a= new NotaString();

console.log(a);