interface Collection { elems: T[]; } interface CollectionStatic { new (): Collection; } declare const Collection: CollectionStatic; const ALL = "all"; type All = typeof ALL; const result: Collection = new Collection(); const ANOTHER = "another"; type Another = typeof ANOTHER; type Both = Another | All; const result2: Collection = new Collection();