TypeScript/tests/cases/fourslash/codeFixReturnTypeInAsyncFunction18.ts
Daniel Rosenwasser 94c5c3ff47
Add missing arguments to typeToTypeNode. (#38336)
* Add missing arguments to typeToTypeNode.

* Use returnTypeNode as the enclosingDeclaration.

* Add a test.
2020-05-04 19:32:27 -07:00

21 lines
393 B
TypeScript

/// <reference path='fourslash.ts' />
// @target: es2015
////
////interface A {}
////export { A as PublicA };
////async function foo(): A {
//// return {}
////}
verify.codeFix({
index: 0,
description: [ts.Diagnostics.Replace_0_with_Promise_1.message, "A", "A"],
newFileContent: `
interface A {}
export { A as PublicA };
async function foo(): Promise<A> {
return {}
}`
});