questions/31997-extreme-parameter-intersection/README.md
Given two parameter arrays, compute a third tuple representing the type of args required to satisfy both of the original tuples.
Your solution should correctly handle fixed and non-fixed length arrays, optional elements and variadic elements. For example:
type Result = IntersectParameters<
[{ a: 0 }, { b: 1 }?, { c: 2 }?, ...{ d: 3 }[]],
[{ e: 4 }?, { f: 5 }?, ...{ g: 6 }[]]
>
type Expected = [
{
a: 0
e: 4
},
{
b: 1
f: 5
}?,
{
c: 2
g: 6
}?,
...{
d: 3
g: 6
}[]
]
<a href="../../README.md" target="_blank"></a> <a href="https://tsch.js.org/31997/answer" target="_blank"></a> <a href="https://tsch.js.org/31997/solutions" target="_blank"></a> <!--info-footer-end-->