TypeScript/tests/cases/fourslash/annotateWithTypeFromJSDoc9.5.ts

21 lines
333 B
TypeScript
Raw Normal View History

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