TypeScript/tests/cases/fourslash/completionInfoWithExplicitTypeArguments.ts
Andy 18357543c6 Provide better services for incomplete generic calls (#16535)
* Provide better services for incomplete generic calls

* Use clearer name

* Remove `inferredAnyDefaultTypeArgument` and `getBestGuessSignature`; have `resolveSignature` always get the best signature if !produceDiagnostics

* Update names and comments
2017-06-27 09:14:23 -07:00

23 lines
642 B
TypeScript

/// <reference path='fourslash.ts'/>
// Note: Giving the functions two parameters means that the checker cannot resolve their signatures normally,
// so it makes a best guess.
////interface I { x: number; y: number; }
////
////declare function f<T>(x: T, y: number): void;
////f<I>({ /*f*/ });
////
////declare function g<T>(x: keyof T, y: number): void;
////g<I>("/*g*/");
goTo.marker("f");
verify.completionListCount(2);
verify.completionListContains("x");
verify.completionListContains("y");
goTo.marker("g");
verify.completionListContains("x");
verify.completionListContains("y");
verify.completionListCount(2);