ea8ccc2ce4
* 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
13 lines
283 B
TypeScript
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)[]");
|