* Add codefix for --noImplicitThis * Code review * Back to building post-merge * Remove redundant functions + update tests Infer-from-usage also inserts `this: any` parameters when needed, so I removed that from fixImplicitThis. Otherwise, fixImplicitThis has better suggestions than inferFromUsage, so I moved inferFromUsage later in the suggestion order. * More redundancy removal Don't need to add `@this` anymore either since inferFromUsage will do that. * More baseline updates From moving inferFromUsage down in priority I think? * remove now-redundant ad-hoc jsdoc emit * fix more bad merge Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
18 lines
364 B
TypeScript
18 lines
364 B
TypeScript
/// <reference path='fourslash.ts' />
|
|
|
|
// @noImplicitThis: true
|
|
|
|
////class C {
|
|
//// m() {
|
|
//// return function g() {
|
|
//// this;
|
|
//// g();
|
|
//// };
|
|
//// }
|
|
////}
|
|
|
|
// note that no implicitThis fix is available, only a inferFromUsage one:
|
|
verify.codeFixAvailable([{
|
|
description: "Infer 'this' type of 'g' from usage",
|
|
}]);
|