The following gets contextually typed: ``` ts var x: ((p: string) => number)[] = [p => p.length]; ``` But the following arguably should also be: ``` ts var x: ((p: string) => number)[] = [...[p => p.length]]; ``` Same is true for calls: ``` ts function foo(...rest: ((p: string) => number)[]) {} foo(p => p.length); ``` So we should do it for the following as well: ``` ts function foo(...rest: ((p: string) => number)[]) {} foo(...[p => p.length]); ```
Activity
RyanCavanaugh commentedon May 4, 2015
Supported on the grounds of consistency, but at the same time there's no reason to spread a bare literal, so what's the point?
JsonFreeman commentedon May 4, 2015
Yeah that makes sense.