2019-07-12 19:07:55 +02:00
|
|
|
/// <reference path="fourslash.ts" />
|
|
|
|
////async function fn(a: string, b: Promise<string>) {
|
|
|
|
//// const x = b;
|
2019-08-21 01:53:28 +02:00
|
|
|
//// const y = b;
|
|
|
|
//// x + y;
|
2019-07-12 19:07:55 +02:00
|
|
|
////}
|
|
|
|
|
|
|
|
verify.codeFix({
|
2019-08-21 01:53:28 +02:00
|
|
|
description: "Add 'await' to initializers",
|
2019-07-12 19:07:55 +02:00
|
|
|
index: 0,
|
|
|
|
newFileContent:
|
|
|
|
`async function fn(a: string, b: Promise<string>) {
|
|
|
|
const x = await b;
|
2019-08-21 01:53:28 +02:00
|
|
|
const y = await b;
|
|
|
|
x + y;
|
2019-07-12 19:07:55 +02:00
|
|
|
}`
|
|
|
|
});
|
|
|
|
|
2020-01-16 19:07:37 +01:00
|
|
|
verify.not.codeFixAllAvailable("addMissingAwait");
|