TypeScript/tests/cases/fourslash/codeFixInferFromUsagePromise.ts

10 lines
266 B
TypeScript
Raw Normal View History

2019-09-07 00:15:19 +02:00
/// <reference path='fourslash.ts' />
// @noImplicitAny: true
//// function foo([|p |]) {
//// return p.then((x: string[]) => x[0])
//// }
verify.rangeAfterCodeFix("p: Promise<string[]>", /*includeWhiteSpace*/ undefined, /*errorCode*/ undefined, /*index*/0);