2017-09-25 18:02:42 +02:00
|
|
|
/// <reference path='fourslash.ts' />
|
|
|
|
// @strict: true
|
|
|
|
/////**
|
|
|
|
//// * @param {*} x
|
|
|
|
//// * @param {?} y
|
|
|
|
//// * @param {number=} z
|
|
|
|
//// * @param {...number} alpha
|
|
|
|
//// * @param {function(this:{ a: string}, string, number): boolean} beta
|
|
|
|
//// * @param {number?} gamma
|
|
|
|
//// * @param {number!} delta
|
|
|
|
//// */
|
2018-03-06 16:49:21 +01:00
|
|
|
////function [|f|](x, y, z, alpha, beta, gamma, delta) {
|
2018-04-05 21:33:00 +02:00
|
|
|
//// x; y; z; alpha; beta; gamma; delta;
|
2017-09-25 18:02:42 +02:00
|
|
|
////}
|
|
|
|
|
2018-03-06 16:49:21 +01:00
|
|
|
verify.codeFix({
|
|
|
|
description: "Annotate with type from JSDoc",
|
2018-10-29 21:23:33 +01:00
|
|
|
index: 7,
|
2018-03-06 16:49:21 +01:00
|
|
|
newFileContent:
|
2017-09-25 18:02:42 +02:00
|
|
|
`/**
|
|
|
|
* @param {*} x
|
|
|
|
* @param {?} y
|
|
|
|
* @param {number=} z
|
|
|
|
* @param {...number} alpha
|
|
|
|
* @param {function(this:{ a: string}, string, number): boolean} beta
|
|
|
|
* @param {number?} gamma
|
|
|
|
* @param {number!} delta
|
|
|
|
*/
|
2017-10-18 22:04:13 +02:00
|
|
|
function f(x: any, y: any, z: number | undefined, alpha: number[], beta: (this: { a: string; }, arg1: string, arg2: number) => boolean, gamma: number | null, delta: number) {
|
2018-04-05 21:33:00 +02:00
|
|
|
x; y; z; alpha; beta; gamma; delta;
|
2018-03-06 16:49:21 +01:00
|
|
|
}`,
|
|
|
|
});
|