Initially, I wanted to type `redux`' `mapDispatchToProps`-like function and got stuck with handling an array of functions (action creators) as an argument. There is a hacky but working example. I wonder if it can be improved.

The problem is that return type does not preserve types per item, it gets generalized to a union.

**Update:** the problem is in preserving parameter types per function in the resulting array.

In short, code below should be with no errors:

```js
type F = (...x: any[]) => any
type Wrap<T extends F> = (...x: Parameters<T>) => void

const wrap = (fn: any) => (...a: any) => {fn(...a)}

// currently working solution
// the problem is K being too wide (number | string | symbol) for array index thus silenced
// // @ts-expect-error
// function main<Fs extends readonly F[]>(fs: Fs): {[K in keyof Fs]: Wrap<Fs[K]>}

// TODO: desired solution but not finished: every item in `fs` should be wrapped with `Wrap`
function main<Fs extends readonly F[]>(fs: Fs): [...Fs]

function main(fs: any) {return fs.map(wrap)}

const n = (x: number) => x
const s = (x: string) => x
const fs = main([n, s] as const)

// TEST PARAMETERS TYPES
fs[0](1)
fs[1]('1')
// @ts-expect-error
fs[0]('1')
// @ts-expect-error
fs[1](1)

// TEST RETURN TYPES
const _1: void = fs[0](1)
const _2: void = fs[1]('1')
// @ts-expect-error
const _3: number = fs[0](1)
// @ts-expect-error
const _4: string = fs[1]('1')

```

[TypeScript playground](https://www.typescriptlang.org/play?#code/C4TwDgpgBAYlC8UAUA6NAPAXFAhgOxAG0BdASgQD5cCAoUSKAdQCccwAeAFSgnWAjwATAM6wqiVBmwAFHKwC2Efs2FcK5eFQBuAewCWgmjQDGOvMOBQA7qzAJkAMzzZ8IDVUkocLgu6gBvJ08cUgBfIwB6CKhjAFdmZgFgABsQax1mAGs9PABzKGEdZNjgPTMaKKhgAAtoMGYdACNkiHkoPVEAaShGiBz84B0dawNoJDxY+V7mKAAfAuBmfrmCkCmi8gcM3AScNJzBXirq2NFhPRa8YwhDSsqAAWBhAFpeSGNgV4SMiuiHWKupTMUHkOBy7Bgol4-CEokSOEEZlSsBIFCQDmE2EhpGw-kI3RyUEyEBAOgcsGExGwLDYEOE+OIFHCvygnAA8gARNnYQ7nRKCApFEplPA9EpQPA6SwOHIdWqCbAQLQQZj7fhtQkAAwxmoK1R0sWSAt61lskAFVj0NSgmppYE1NH+gJFILBeDpPD4AhEUHhiLwyJgqPRmIpOKghDQKEhxCMTo+LtBORDPjcAUSwHiooxKFBYCQNjYYSMpnMllFEiwEsm0z86BMZgsBXsSCrFiWeTrDbLUAx9iTeCQhDwABoCsRcKJSxZSJFopwAKIAZW40gAggAlNcAWQXi43S9ZAE1pMvHfSAAzEJAARlnGMIN+vAHIb8-Zw8nq90O9PiqGsw56EFeSCvu+LKPC8bwQB8XwAUBT63rOLKLiuUAbnuACqG4AHLHqeS7dk2AD6N7YLoBj2A+IF3kRljEQATOR+gCogD6IWBH7RJB36-nBPzTvRADM2ATFMKpUZe160Z+UE-jBf7fIBglQMRAAs2DtssbH0hxb6zkAA)

**P.S:** there is [an open (as for 25-aug-2020) github issue](https://github.com/microsoft/TypeScript/issues/27995) related to problem of my solution #1, so it is not about variadic tuple types but about `keyof ArrayType` being too wide for an array index type