TypeScript/tests/cases/fourslash/annotateWithTypeFromJSDoc20.ts

21 lines
366 B
TypeScript
Raw Normal View History

2017-10-12 20:40:40 +02:00
/// <reference path='fourslash.ts' />
// @strict: true
/////**
//// * @param {number} a
//// * @param {T} b
//// */
////function f<T>(a, b) {
2017-10-12 20:40:40 +02:00
////}
verify.codeFix({
description: "Annotate with type from JSDoc",
errorCode: 80004, // ignore 'unused T'
newFileContent:
2017-10-12 20:40:40 +02:00
`/**
* @param {number} a
* @param {T} b
*/
function f<T>(a: number, b: T) {
}`,
});