I have something to the effect of
function(param1, { knownParam1, ...opts })
I would like to type it to at least describe param1 and knownParam1. I'm thinking something like:
type Param2 = {
knownParam1: string,
...otherParams: any
}
type Parameters = {
param1: string
param2: Param2
}
Is this sort of concept supported by TypeScript? I have a feeling it's not since destructuring is a bit of a new concept.