TypeScript/tests/cases/fourslash/annotateWithTypeFromJSDoc9.5.ts
Andy 0f47c8a205
annotateWithTypeFromJSDoc: Do less special-casing for arrow functions (#22407)
* annotateWithTypeFromJSDoc: Do less special-casing for arrow functions

* Code review
2018-03-08 16:32:32 -08:00

19 lines
323 B
TypeScript

/// <reference path='fourslash.ts' />
/////**
//// * @template {T}
//// * @param {T} x
//// * @returns {T}
//// */
////var f = /*a*/x/*b*/ => x
verify.codeFix({
description: "Annotate with type from JSDoc",
newFileContent:
`/**
* @template {T}
* @param {T} x
* @returns {T}
*/
var f = <T>(x: T): T => x`,
});