export class Buffer { constructor ( public id ) { } } export class Window { constructor ( public id ) { } } export class Tabpage { constructor ( public id ) { } } export interface ExtTypeConstructor < T > { new ( ... args ) : T ; } export interface MetadataType { constructor : ExtTypeConstructor < Buffer | Tabpage | Window > ; name : string ; } export const Metadata = [ { constructor : Buffer , name : 'Buffer' } , { constructor : Window , name : 'Window' } , { constructor : Tabpage , name : 'Tabpage' } , ] ;