type script class定義 ネスト

class Response{
    users: User[]
    constructor(users: User[]) {
        this.users = users
    }
}

class User{
    name: string;
    constructor(name: string) {
        this.name = name
    }
}

var u = new User("yohei")
var r = new Response([u])
console.log(r)

参考

https://www.typescriptlang.org/play/