What it the best way in Typescript to only allow a number of value for a property ?
class Foo { public type:string
const TYPES = ['a', 'b', 'c'] as const; // TS3.4 syntax type yourType = typeof TYPES[number]; // 'a'|'b'|'c';