be0fcd5174
* Overloads in Array.concat now handle ReadonlyArray Previously it was union types, which is slower. * Make arrayConcat3 test stricter * Switch to InputArray instead of adding overloads * Update baselines * Update baselines correctly * Rename to ConcatArray and add slice method Should make it, respectively, easier to understand this specific type and harder to satisfy it by mistake.
6 lines
283 B
TypeScript
6 lines
283 B
TypeScript
// @strictFunctionTypes: true
|
|
// TODO: remove lib hack when https://github.com/Microsoft/TypeScript/issues/20454 is fixed
|
|
type Fn<T extends object> = <U extends T>(subj: U) => U
|
|
function doStuff<T extends object, T1 extends T>(a: Array<Fn<T>>, b: Array<Fn<T1>>) {
|
|
b.concat(a);
|
|
}
|