Move infer-from-usage earlier in codefix list (#28318)

This makes it appear before the ts-ignore codefix, specifically.
This commit is contained in:
Nathan Shively-Sanders 2018-11-02 15:39:27 -07:00 committed by GitHub
parent 4e59096ea5
commit ce85ee5115
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 18 additions and 18 deletions

View File

@ -45,6 +45,7 @@
"refactorProvider.ts",
"codefixes/addMissingInvocationForDecorator.ts",
"codefixes/annotateWithTypeFromJSDoc.ts",
"codefixes/inferFromUsage.ts",
"codefixes/convertFunctionToEs6Class.ts",
"codefixes/convertToAsyncFunction.ts",
"codefixes/convertToEs6Module.ts",
@ -66,7 +67,6 @@
"codefixes/fixAwaitInSyncFunction.ts",
"codefixes/disableJsDiagnostics.ts",
"codefixes/helpers.ts",
"codefixes/inferFromUsage.ts",
"codefixes/fixInvalidImportSyntax.ts",
"codefixes/fixStrictClassInitialization.ts",
"codefixes/generateTypes.ts",

View File

@ -13,7 +13,7 @@
verify.codeFix({
description: "Infer parameter types from usage",
index: 2,
index: 0,
newFileContent:
`/**
* @param {(arg0: any) => void} callback

View File

@ -9,4 +9,4 @@
//// foo += 2;
////}
verify.rangeAfterCodeFix("/** @type {number} */\nvar foo;",/*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 2);
verify.rangeAfterCodeFix("/** @type {number} */\nvar foo;",/*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 0);

View File

@ -11,4 +11,4 @@
////i.p = 0;
verify.rangeAfterCodeFix("p: number", undefined, undefined, 1);
verify.rangeAfterCodeFix("p: number", undefined, undefined, 0);

View File

@ -11,7 +11,7 @@
verify.codeFix({
description: "Infer parameter types from usage",
index: 6,
index: 4,
newFileContent:
`/**
* @param {number} a

View File

@ -10,7 +10,7 @@
verify.codeFix({
description: "Infer parameter types from usage",
index: 2,
index: 0,
newFileContent:
`/**
* @param {number[]} a

View File

@ -12,7 +12,7 @@
verify.codeFix({
description: "Infer parameter types from usage",
index: 2,
index: 0,
newFileContent:
`/**
* @param {number} [a]

View File

@ -15,7 +15,7 @@
verify.codeFix({
description: "Infer parameter types from usage",
index: 2,
index: 0,
newFileContent:
`/**
* @param {*} y

View File

@ -18,7 +18,7 @@
verify.codeFix({
description: "Infer parameter types from usage",
index: 2,
index: 0,
newFileContent:
`/**
* @param {{ b: { c: any; }; }} a

View File

@ -15,7 +15,7 @@
verify.codeFix({
description: "Infer parameter types from usage",
index: 2,
index: 0,
newFileContent:
`/**
* @param {number} a

View File

@ -12,7 +12,7 @@
verify.codeFix({
description: "Infer parameter types from usage",
index: 2,
index: 0,
newFileContent:
`/**
* @param {number} a

View File

@ -15,7 +15,7 @@
verify.codeFix({
description: "Infer parameter types from usage",
index: 4,
index: 2,
newFileContent:
`/**
* @param {number} a

View File

@ -13,7 +13,7 @@
verify.codeFix({
description: "Infer type of \'x\' from usage",
index: 2,
index: 0,
newFileContent:
`class C {
/**

View File

@ -22,7 +22,7 @@
goTo.file("/b.js");
verify.codeFix({
index: 2,
index: 0,
description: "Infer type of 'x' from usage",
newFileContent:
`export class C {

View File

@ -11,7 +11,7 @@
verify.codeFix({
description: "Infer parameter types from usage",
index: 2,
index: 0,
newFileContent:
`class C {/**
* @param {number} x

View File

@ -11,7 +11,7 @@
////}
verify.codeFix({
index: 2,
index: 0,
description: "Infer parameter types from usage",
newFileContent:
`/**

View File

@ -15,4 +15,4 @@ var x;
function f() {
x++;
}
`, /*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 2);
`, /*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 0);

View File

@ -11,4 +11,4 @@
//// x++;
////}
verify.rangeAfterCodeFix("/** @type {number } */\nvar x;", /*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 2);
verify.rangeAfterCodeFix("/** @type {number } */\nvar x;", /*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, 0);