diff --git a/tests/cases/fourslash/annotateWithTypeFromJSDoc19.ts b/tests/cases/fourslash/annotateWithTypeFromJSDoc19.ts new file mode 100644 index 00000000000..9e7ef6d25fd --- /dev/null +++ b/tests/cases/fourslash/annotateWithTypeFromJSDoc19.ts @@ -0,0 +1,19 @@ +/// +// @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(a: number, b: T) { +}`, 'Annotate with types from JSDoc', 'annotate'); diff --git a/tests/cases/fourslash/annotateWithTypeFromJSDoc20.ts b/tests/cases/fourslash/annotateWithTypeFromJSDoc20.ts new file mode 100644 index 00000000000..a45eb788c73 --- /dev/null +++ b/tests/cases/fourslash/annotateWithTypeFromJSDoc20.ts @@ -0,0 +1,17 @@ +/// +// @strict: true +/////** +//// * @param {number} a +//// * @param {T} b +//// */ +////function /*1*/f(a, b) { +////} + +verify.applicableRefactorAvailableAtMarker('1'); +verify.fileAfterApplyingRefactorAtMarker('1', +`/** + * @param {number} a + * @param {T} b + */ +function f(a: number, b: T) { +}`, 'Annotate with types from JSDoc', 'annotate');