mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-09 16:39:46 -05:00
Test refactor of JSDoc @template tag
This commit is contained in:
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');
|
||||
Reference in New Issue
Block a user