Test refactor of JSDoc @template tag
This commit is contained in:
parent
123347d5c4
commit
b440d75bc4
2 changed files with 36 additions and 0 deletions
19
tests/cases/fourslash/annotateWithTypeFromJSDoc19.ts
Normal file
19
tests/cases/fourslash/annotateWithTypeFromJSDoc19.ts
Normal file
|
@ -0,0 +1,19 @@
|
|||
/// <reference path='fourslash.ts' />
|
||||
// @strict: true
|
||||
/////**
|
||||
//// * @template T
|
||||
//// * @param {number} a
|
||||
//// * @param {T} b
|
||||
//// */
|
||||
////function /*1*/f(a, b) {
|
||||
////}
|
||||
|
||||
verify.applicableRefactorAvailableAtMarker('1');
|
||||
verify.fileAfterApplyingRefactorAtMarker('1',
|
||||
`/**
|
||||
* @template T
|
||||
* @param {number} a
|
||||
* @param {T} b
|
||||
*/
|
||||
function f<T>(a: number, b: T) {
|
||||
}`, 'Annotate with types from JSDoc', 'annotate');
|
17
tests/cases/fourslash/annotateWithTypeFromJSDoc20.ts
Normal file
17
tests/cases/fourslash/annotateWithTypeFromJSDoc20.ts
Normal file
|
@ -0,0 +1,17 @@
|
|||
/// <reference path='fourslash.ts' />
|
||||
// @strict: true
|
||||
/////**
|
||||
//// * @param {number} a
|
||||
//// * @param {T} b
|
||||
//// */
|
||||
////function /*1*/f<T>(a, b) {
|
||||
////}
|
||||
|
||||
verify.applicableRefactorAvailableAtMarker('1');
|
||||
verify.fileAfterApplyingRefactorAtMarker('1',
|
||||
`/**
|
||||
* @param {number} a
|
||||
* @param {T} b
|
||||
*/
|
||||
function f<T>(a: number, b: T) {
|
||||
}`, 'Annotate with types from JSDoc', 'annotate');
|
Loading…
Reference in a new issue