Q:

Model in Angular and Typescript. Class, SubClass and Interface

On and Angular 7 / Typescript service I am calling a GetTopPosts API method that returns:
"result": [
  {
    "id": 1,
    "title": "History of Design",
    "category": {
      "id": 3,
      "name": "design"
    }
  },
  {
    "id": 2,
    "title": "Angular",
    "category": {
      "id": 4,
      "name": "code"
    }
  }
]

The model on my backend from which each post is generate is Response:
public class GetTopPostsModel {

  public class Response {  

    public Int32 Id { get; set; }
    public String Title { get; set; }  
    public CategoryModel Category { get; set; }

    public class CategoryModel {
      public Int32 Id { get; set; }
      public String Name { get; set; }
    }

  }

}

How to translate GetTopPostsModel to Typescript?

Should I use interface or class?
Can subclasses be used, e.g., CategoryModel is a subclass of Response which is a sub class of GetTopPostsModel

Note
In TypeScript I am defining Envelope as follows:
export class Envelope<T> {

  result: T[];

  constructor(result: T[]) {
    this.result = result;
  }

}

A:

You may translate it as
export interface Response {
    public number Id;
    public string Title;  
    public Category category
}

export interface Category {
      public number id;
      public string name;
    }

and use the angular http service to get it:
import { HttpClient } from "@angular/common/http"

public getLatest(): Observable<Response[]> {
    return this.http.get<Response[]>("api/latest");
}

When the entities are coming from a REST service (and not created directly), you can use interfaces. Keep in mind that typescript get traspiled and type information gets lost.
For this reason, the shape of the object is the only important thing: an object declaring all the fields and methods of your interface can be treated as a "true" object implementing that interface. This is a bit strange when you come from a strongly typed language like C#.
With this in mind, the concept of "subclass" becomes "has the same shape". 

