groupBranchesByTypeof()
groupBranchesByTypeof(
branches):Map<string,number[]>
Experimental
Groups union branches by their typeof check for optimization.
Primitive unions like string | number can use a single typeof check.
Parameters
branches: UnionBranchMeta[]
Union branches to analyze
Returns: Map<string, number[]>
Map of typeof values to branch indices
Since
2.0.0