How to you create a decorator pattern in typescript?
<p>I'm trying to create objects from a set of classes without having to define each set... essentially I'm trying to create the decorator pattern. In typescript this seems to be near impossible due to compiling restrictions.</p>

<p>I've tried using Proxies. No dice.</p>

<p>Here's the usage I'm trying to accomplish (some code is missing to allow what I'm trying to do - which is what I'm trying to solve).</p>

<pre><code>class Person {

    public name:string;
    public age:number;

    public identify(){
        console.log(`${this.name} age ${this.age}`);
    }


}

class Child {

    public Mother:Person;
    public Father:Person;

    public logParents(){
        console.log("Parents:");
        this.Mother.identify();
        this.Father.identify();
    }

}

class Student {

    public school:string;

    public logSchool(){
        console.log(this.school);
    }

}

let Dad = new Person();
Dad.name = "Brad";
Dad.age = 32;

let Mom = new Person();
Mom = new Student(Mom);
Mom.name = "Janet";
Mom.age = 34;
Mom.school = "College of Night School Moms";

let Johnny = new Person();
Johnny = new Child(Johnny);
Johnny = new Student(Johnny);
Johnny.name = "Johnny";
Johnny.age = 12;
Johnny.Mother = Mom;
Johnny,Father = Dad;
Johnny.school = "School for kids who can't read good";
</code></pre>