Skip to content

Commit f9123aa

Browse files
author
Arthur Ozga
committed
rename fourslash method
1 parent 5030d0f commit f9123aa

8 files changed

+19
-19
lines changed

src/harness/fourslash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3816,7 +3816,7 @@ namespace FourSlashInterface {
38163816
this.state.verifyRangeIs(expectedText, includeWhiteSpace);
38173817
}
38183818

3819-
public applyCodeFix(errorCode?: number, index?: number): void {
3819+
public getAndApplyCodeFix(errorCode?: number, index?: number): void {
38203820
this.state.getAndApplyCodeActions(errorCode, index);
38213821
}
38223822

tests/cases/fourslash/codeFixAddMissingMember5.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
////}
1212
////|]
1313

14-
verify.applyCodeFix(/*errorCode*/ undefined, /*index*/ 0);
14+
verify.getAndApplyCodeFix(/*errorCode*/ undefined, /*index*/ 0);
1515
verify.currentFileContentIs(`class C {
1616
static method() {
1717
()=>{ this.foo === 10 };

tests/cases/fourslash/codeFixAddMissingMember7.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
////}
1010
////|]
1111

12-
verify.applyCodeFix(/*errorCode*/ undefined, /*index*/ 2)
12+
verify.getAndApplyCodeFix(/*errorCode*/ undefined, /*index*/ 2)
1313
verify.currentFileContentIs(`class C {
1414
static p = ()=>{ this.foo === 10 };
1515
}

tests/cases/fourslash/codeFixUndeclaredAcrossFiles1.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
//// static y: string;
1818
//// }
1919

20-
verify.applyCodeFix(/*errorCode*/undefined, 0);
21-
verify.applyCodeFix(/*errorCode*/undefined, 0);
22-
verify.applyCodeFix(/*errorCode*/undefined, 0);
23-
verify.applyCodeFix(/*errorCode*/undefined, 0);
20+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
21+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
22+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
23+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
2424

2525
verify.rangeIs(`
2626
y: { [x: string]: any; };

tests/cases/fourslash/codeFixUndeclaredAcrossFiles2.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
//// constructor() { }
1919
//// }|]
2020

21-
verify.applyCodeFix(/*errorCode*/undefined, 0);
22-
verify.applyCodeFix(/*errorCode*/undefined, 0);
23-
verify.applyCodeFix(/*errorCode*/undefined, 0);
24-
verify.applyCodeFix(/*errorCode*/undefined, 0);
21+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
22+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
23+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
24+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
2525

2626
verify.rangeIs(`
2727
export class C {

tests/cases/fourslash/codeFixUndeclaredInStaticMethod.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
//// }
1010
//// }
1111

12-
verify.applyCodeFix(/*errorCode*/undefined, 0);
13-
verify.applyCodeFix(/*errorCode*/undefined, 0);
14-
verify.applyCodeFix(/*errorCode*/undefined, 0);
15-
verify.applyCodeFix(/*errorCode*/undefined, 0);
12+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
13+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
14+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
15+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
1616

1717
verify.rangeIs(`
1818
static prop2: string;

tests/cases/fourslash/codeFixUndeclaredMethod.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
//// }
1111
//// }
1212

13-
verify.applyCodeFix(/*errorCode*/undefined, 0);
14-
verify.applyCodeFix(/*errorCode*/undefined, 0);
15-
verify.applyCodeFix(/*errorCode*/undefined, 0);
13+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
14+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
15+
verify.getAndApplyCodeFix(/*errorCode*/undefined, 0);
1616

1717
verify.rangeIs(`
1818
foo3<T0, T1, T2, T3, T4, T5, T6, T7>(): any {

tests/cases/fourslash/fourslash.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ declare namespace FourSlashInterface {
237237
DocCommentTemplate(expectedText: string, expectedOffset: number, empty?: boolean): void;
238238
noDocCommentTemplate(): void;
239239
rangeAfterCodeFix(expectedText: string, includeWhiteSpace?: boolean, errorCode?: number, index?: number): void
240-
applyCodeFix(errorCode?: number, index?: number): void;
240+
getAndApplyCodeFix(errorCode?: number, index?: number): void;
241241
rangeIs(expectedText: string, includeWhiteSpace?: boolean): void;
242242
fileAfterApplyingRefactorAtMarker(markerName: string, expectedContent: string, refactorNameToApply: string, formattingOptions?: FormatCodeOptions): void;
243243
importFixAtPosition(expectedTextArray: string[], errorCode?: number): void;

0 commit comments

Comments
 (0)