Skip to content

Commit 4b80906

Browse files
committed
Change codefix message
1 parent bbba931 commit 4b80906

15 files changed

+15
-15
lines changed

src/compiler/diagnosticMessages.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3843,7 +3843,7 @@
38433843
"category": "Message",
38443844
"code": 90028
38453845
},
3846-
"Convert to async": {
3846+
"Add async modifier to containing function": {
38473847
"category": "Message",
38483848
"code": 90029
38493849
},

tests/cases/fourslash/codeFixAwaitInSyncFunction1.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
////}
66

77
verify.codeFix({
8-
description: "Convert to async",
8+
description: "Add async modifier to containing function",
99
newFileContent:
1010
`async function f() {
1111
await Promise.resolve();

tests/cases/fourslash/codeFixAwaitInSyncFunction10.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
////}
66

77
verify.codeFix({
8-
description: "Convert to async",
8+
description: "Add async modifier to containing function",
99
newFileContent:
1010
`const f: () => Promise<number | string> = async () => {
1111
await Promise.resolve('foo');

tests/cases/fourslash/codeFixAwaitInSyncFunction11.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
// should not change type if it's incorrectly set
88
verify.codeFix({
9-
description: "Convert to async",
9+
description: "Add async modifier to containing function",
1010
newFileContent:
1111
`const f: string = async () => {
1212
await Promise.resolve('foo');

tests/cases/fourslash/codeFixAwaitInSyncFunction12.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
////}
66

77
verify.codeFix({
8-
description: "Convert to async",
8+
description: "Add async modifier to containing function",
99
newFileContent:
1010
`const f: () => Promise<Array<number | string>> = async function() {
1111
await Promise.resolve([]);

tests/cases/fourslash/codeFixAwaitInSyncFunction13.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
////}
66

77
verify.codeFix({
8-
description: "Convert to async",
8+
description: "Add async modifier to containing function",
99
newFileContent:
1010
`const f: () => Promise<number | string> = async () => {
1111
await Promise.resolve('foo');

tests/cases/fourslash/codeFixAwaitInSyncFunction14.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
////}
66

77
verify.codeFix({
8-
description: "Convert to async",
8+
description: "Add async modifier to containing function",
99
newFileContent:
1010
`const f = async function(): Promise<number> {
1111
await Promise.resolve(1);

tests/cases/fourslash/codeFixAwaitInSyncFunction15.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
////}
66

77
verify.codeFix({
8-
description: "Convert to async",
8+
description: "Add async modifier to containing function",
99
newFileContent:
1010
`const f = async (): Promise<number[]> => {
1111
await Promise.resolve([1]);

tests/cases/fourslash/codeFixAwaitInSyncFunction2.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
////}
66

77
verify.codeFix({
8-
description: "Convert to async",
8+
description: "Add async modifier to containing function",
99
newFileContent:
1010
`const f = async function() {
1111
await Promise.resolve();

tests/cases/fourslash/codeFixAwaitInSyncFunction5.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
////}
88

99
verify.codeFix({
10-
description: "Convert to async",
10+
description: "Add async modifier to containing function",
1111
newFileContent:
1212
`class Foo {
1313
async bar() {

tests/cases/fourslash/codeFixAwaitInSyncFunction6.5.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
////}
66

77
verify.codeFix({
8-
description: "Convert to async",
8+
description: "Add async modifier to containing function",
99
newFileContent:
1010
`const f = async promise => {
1111
await promise;

tests/cases/fourslash/codeFixAwaitInSyncFunction6.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
////}
66

77
verify.codeFix({
8-
description: "Convert to async",
8+
description: "Add async modifier to containing function",
99
newFileContent:
1010
`const f = async (promise) => {
1111
await promise;

tests/cases/fourslash/codeFixAwaitInSyncFunction7.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
////}
88

99
verify.codeFix({
10-
description: "Convert to async",
10+
description: "Add async modifier to containing function",
1111
newFileContent:
1212
`async function f() {
1313
for await (const x of g()) {

tests/cases/fourslash/codeFixAwaitInSyncFunction8.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
////}
66

77
verify.codeFix({
8-
description: "Convert to async",
8+
description: "Add async modifier to containing function",
99
newFileContent:
1010
`async function f(): Promise<number | string> {
1111
await Promise.resolve(8);

tests/cases/fourslash/codeFixAwaitInSyncFunction9.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
////}
88

99
verify.codeFix({
10-
description: "Convert to async",
10+
description: "Add async modifier to containing function",
1111
newFileContent:
1212
`class Foo {
1313
async bar(): Promise<string> {

0 commit comments

Comments
 (0)