5d04250ea8
* Improve codeFixAll for add missing await * Improve add missing await for initializers and fix-all * Fix when only one side of a binary expression can have its initializer fixed
15 lines
319 B
TypeScript
15 lines
319 B
TypeScript
/// <reference path="fourslash.ts" />
|
|
////async function fn(a: Promise<string>) {
|
|
//// const x = a;
|
|
//// x.toLowerCase();
|
|
////}
|
|
|
|
verify.codeFix({
|
|
description: "Add 'await' to initializer for 'x'",
|
|
index: 0,
|
|
newFileContent:
|
|
`async function fn(a: Promise<string>) {
|
|
const x = await a;
|
|
x.toLowerCase();
|
|
}`
|
|
});
|