* Infer from usage quick fix * Change full function singature * Add property/element access support * Fix a few issues * Some cleanup * Expose getArrayType and getPromiseType * Switch to collecting all usage before infering * Infer array and promise type arguments * Handel enums in binary operators * consolidate usage of addCandidateTypes * Handel rest paramters * Properly handel `+=` and `+` inference for numbers and strings * Add print quickfixes debug helper * Add rest param tests * Add optional paramter tests * Handel set accessors * Support getters * Support no implicit any error for variable at use site * Support properties * Only offer quick fix if an infered type other than any is available * Rename functions * Move to a separate namespace * Check cancellation token * Cleanup * Check for accesibile symbols where serializing types * Remove JS support * Reorganize functions * Mark APIs as internal * Fix lint errors * Removed conflict markers. * Update 'createSymbol' to use '__String'. * Fixed most problems relating to '__String' and 'includeJsDocComments' in the fix itself. * Addressed most API changes. * Make all helpers internal * Use a diffrent writer and not the built-in single line write * Infer types for all parameters in a parameter list instead of one at a time * Accept baselines * Code review commments * Respond to code review comments
21 lines
410 B
TypeScript
21 lines
410 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @noImplicitAny: true
|
|
////function f1([|a |]) { }
|
|
////function h1() {
|
|
//// class C { p: number };
|
|
//// f1({ ofTypeC: new C() });
|
|
////}
|
|
////
|
|
////function f2([|a |]) { }
|
|
////function h2() {
|
|
//// interface I { a: number }
|
|
//// var i: I = {a : 1};
|
|
//// f2(i);
|
|
//// f2(2);
|
|
//// f2(false);
|
|
////}
|
|
////
|
|
|
|
verify.not.codeFixAvailable();
|