Interfaces let you specify behavior without specifying implementation; classes let you encapsulate implementation details behind an interface. TypeScript classes can encapsulate fields or methods, just as classes in other languages.
Here's an example of our Record structure, this time as a class with an interface:
class RecordInterface { call: string; lat: number; lng: number; constructor(c: string, la: number, lo: number) {} printLocation() {} } class Record implements RecordInterface { call: string; lat: number; lng: number; constructor(c: string, la: number, lo: number) { this.call = c; this.lat = la; this.lng = lo; } printLocation() { console.log(this.call + ': ' + this.lat + ', ' + this.lng); } } var myObj : Record = new Record('kf6gpe-7', 21.9749, 159.3686); myObj.printLocation();