TypeScript/tests/cases/fourslash/annotateWithTypeFromJSDoc11.ts
Nathan Shively-Sanders 594430f113
Infer from arrows from usage. (#28832)
* 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.
2018-12-04 09:03:08 -08:00

19 lines
305 B
TypeScript

/// <reference path='fourslash.ts' />
/////**
//// * @param {?} x
//// * @returns {number}
//// */
////var f = (x) => x
verify.codeFix({
index: 0,
description: "Annotate with type from JSDoc",
newFileContent:
`/**
* @param {?} x
* @returns {number}
*/
var f = (x: any): number => x`,
});