mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-11 10:00:13 -06:00
Test refactor of JSDoc @template tag
This commit is contained in:
parent
123347d5c4
commit
b440d75bc4
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…
x
Reference in New Issue
Block a user