Typescript - Allowed values for a property : <p>What it the best way in Typescript to only allow a number of value for a property ?</p>

<pre class="lang-js prettyprint-override"><code>class Foo {
    public type:string;
    // Possible values for type: ['foo1', 'foo2', 'foo3']

    constructor() {}
}
</code></pre>

<p>I'd like to make those types the only allowed types, preventing me to put a wrong type when extending Foo class.</p>
