mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-18 07:29:16 -05:00
Error on all uses of this that are implicitly any
Previously it was only an error inside an function.
This commit is contained in:
@@ -8110,7 +8110,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
if (compilerOptions.noImplicitThis && isFunctionLike(container)) {
|
||||
if (compilerOptions.noImplicitThis) {
|
||||
// With noImplicitThis, functions may not reference 'this' if it has type 'any'
|
||||
error(node, Diagnostics.this_implicitly_has_type_any_because_it_does_not_have_a_type_annotation);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user