TypeScript/tests/cases/fourslash/completionsConditionalMember.ts
Andrew Branch f1f874699c
Improve some completions on generic object literals (#34855)
* Weird fix

* Slightly better I guess

* Update APIs

* Make `hasTypeArguments` do what it says on the tin

* Fix merge mistake
2019-12-11 11:21:28 -08:00

23 lines
372 B
TypeScript

/// <reference path="fourslash.ts" />
////declare function f<T extends string>(
//// p: { a: T extends 'foo' ? { x: string } : { y: string } }
////): void;
////
////f<'foo'>({ a: { /*1*/ } });
////f<string>({ a: { /*2*/ } });
verify.completions({
marker: '1',
exact: [{
name: 'x'
}]
});
verify.completions({
marker: '2',
exact: [{
name: 'y'
}]
});