594430f113
* Infer from arrows from usage. Previously only function expressions were, and only those with an easily accessible name. Now any arrow function or function expression will infer from usage. * remove isApplicableFunctionForInference *all* functions are applicable for inference now.
13 lines
425 B
TypeScript
13 lines
425 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
// @strict: true
|
|
/////** @type {function(*, ...number, ...boolean): void} */
|
|
////var x = (x, ys, ...zs) => { x; ys; zs; };
|
|
|
|
verify.codeFix({
|
|
index: 3,
|
|
description: "Annotate with type from JSDoc",
|
|
newFileContent:
|
|
`/** @type {function(*, ...number, ...boolean): void} */
|
|
var x: (arg0: any, arg1: number[], ...rest: boolean[]) => void = (x, ys, ...zs) => { x; ys; zs; };`,
|
|
});
|