type [<RequireQualifiedAccess>] RootKind =
| Alpha = 1
| Beta = 2
| Gamma = 3
| Delta = 4
type SubSet1 =
RootKind
type SubSet2 =
RootKind
type UnionSubSet =
U2<SubSet1, SubSet2>
-> SubSet1 & SubSet2 are replaced with their source Enum -- but UnionSubSet stays U2 because it doesn't use Enum Cases directly, but via other SubSets of source Enum.
With this PR Unions of Sub-Sets get reduced too:
type UnionSubSet = RootKind
Additional: I now place a remarks XML comment with the TypeScript Definition on the Alias:
/// <remarks>
/// Original in TypeScript:
/// <code lang="typescript">
/// RootKind.Alpha | RootKind.Gamma
/// </code>
/// </remarks>
type SubSet1 =
RootKind
/// <remarks>
/// Original in TypeScript:
/// <code lang="typescript">
/// Sub1Kind | Sub1Kind
/// </code>
/// </remarks>
type UnionSubSet =
RootKind
->
->
SubSet1
&SubSet2
are replaced with their source Enum -- butUnionSubSet
staysU2
because it doesn't use Enum Cases directly, but via other SubSets of source Enum.With this PR Unions of Sub-Sets get reduced too:
Additional: I now place a
remarks
XML comment with the TypeScript Definition on the Alias: