TypeScript/tests/cases/fourslash/codeFixInferFromUsageRestParam2.ts
Nathan Shively-Sanders ea8ccc2ce4
In JS, constructor functions infer from call+construct (#28353)
* constructor functions infer from call+construct

Also fix an incorrect combining of inferences for rest parameters: the
inferred types will be arrays in the body of the function and the
arguments from outside the function will be the element type.

* All functions infer from call+construct contexts
2018-11-16 09:51:07 -08:00

13 lines
283 B
TypeScript

/// <reference path='fourslash.ts' />
// @noImplicitAny: true
////function f(a: number, [|...rest |]){
//// a; rest;
////}
////f(1);
////f(2, "s1");
////f(3, false, "s2");
////f(4, "s1", "s2", false, "s4");
verify.rangeAfterCodeFix("...rest: (string | boolean)[]");