0f47c8a205
* annotateWithTypeFromJSDoc: Do less special-casing for arrow functions * Code review
19 lines
323 B
TypeScript
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`,
|
|
});
|