to narrow
A
import {F} from 'ts-toolbelt'
declare function foo<A extends any[]>(x: F.Narrow<A>): A;
declare function bar<A extends object>(x: F.Narrow<A>): A;
const test0 = foo(['e', 2, true, {f: ['g', ['h']]}])
// `A` inferred : ['e', 2, true, {f: ['g']}]
const test1 = bar({a: 1, b: 'c', d: ['e', 2, true, {f: ['g']}]})
// `A` inferred : {a: 1, b: 'c', d: ['e', 2, true, {f: ['g']}]}
Prevent type widening on generic function parameters