rename fourslash method

This commit is contained in:
Arthur Ozga 2017-06-01 11:01:00 -07:00
parent 5030d0f468
commit f9123aa5cc
8 changed files with 19 additions and 19 deletions

View file

@ -3816,7 +3816,7 @@ namespace FourSlashInterface {
this.state.verifyRangeIs(expectedText, includeWhiteSpace);
}
public applyCodeFix(errorCode?: number, index?: number): void {
public getAndApplyCodeFix(errorCode?: number, index?: number): void {
this.state.getAndApplyCodeActions(errorCode, index);
}

View file

@ -11,7 +11,7 @@
////}
////|]
verify.applyCodeFix(/*errorCode*/ undefined, /*index*/ 0);
verify.getAndApplyCodeFix(/*errorCode*/ undefined, /*index*/ 0);
verify.currentFileContentIs(`class C {
static method() {
()=>{ this.foo === 10 };

View file

@ -9,7 +9,7 @@
////}
////|]
verify.applyCodeFix(/*errorCode*/ undefined, /*index*/ 2)
verify.getAndApplyCodeFix(/*errorCode*/ undefined, /*index*/ 2)
verify.currentFileContentIs(`class C {
static p = ()=>{ this.foo === 10 };
}

View file

@ -17,10 +17,10 @@
//// static y: string;
//// }
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.rangeIs(`
y: { [x: string]: any; };

View file

@ -18,10 +18,10 @@
//// constructor() { }
//// }|]
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.rangeIs(`
export class C {

View file

@ -9,10 +9,10 @@
//// }
//// }
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.rangeIs(`
static prop2: string;

View file

@ -10,9 +10,9 @@
//// }
//// }
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.applyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
verify.rangeIs(`
foo3<T0, T1, T2, T3, T4, T5, T6, T7>(): any {

View file

@ -237,7 +237,7 @@ declare namespace FourSlashInterface {
DocCommentTemplate(expectedText: string, expectedOffset: number, empty?: boolean): void;
noDocCommentTemplate(): void;
rangeAfterCodeFix(expectedText: string, includeWhiteSpace?: boolean, errorCode?: number, index?: number): void
applyCodeFix(errorCode?: number, index?: number): void;
getAndApplyCodeFix(errorCode?: number, index?: number): void;
rangeIs(expectedText: string, includeWhiteSpace?: boolean): void;
fileAfterApplyingRefactorAtMarker(markerName: string, expectedContent: string, refactorNameToApply: string, formattingOptions?: FormatCodeOptions): void;
importFixAtPosition(expectedTextArray: string[], errorCode?: number): void;