Here is a similar scenario:
function(param1, { knownParam1, ...opts })
To better describe param1 and knownParam1, perhaps something like this could work:
type Param2 = {
knownParam1: string,
...otherParams: any
}
type Parameters = {
param1: string
param2: Param2
}
Do you think TypeScript supports this kind of concept? It seems like it might not fully support destructuring yet.