Back to Type Challenges

README

questions/13580-hard-replace-union/README.md

latest1.1 KB
Original Source
<!--info-header-start--><h1>Replace Union </h1><blockquote><p>by Konstantin Barabanov <a href="https://github.com/crutch12" target="_blank">@crutch12</a></p></blockquote><p><a href="https://tsch.js.org/13580/play" target="_blank"></a> </p><!--info-header-end-->

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.

<!--info-footer-start-->

<a href="../../README.md" target="_blank"></a> <a href="https://tsch.js.org/13580/answer" target="_blank"></a> <a href="https://tsch.js.org/13580/solutions" target="_blank"></a> <!--info-footer-end-->