Replace Union by Konstantin Barabanov @crutch12 Given an union of types and array of type pairs to replace ([[string, number], [Date, null]]), return a new union replaced with the type pairs.