We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
any
checkJs
// ./foo.ts class Foo { constructor() { this.foo = "Hello"; } slicey() { this.foo = this.foo.slice(); } }
// ./tsconfig.json { "compilerOptions": { "strict": true }, "files": ["./foo.ts"] }
'foo' implicitly has type 'any' because it does not have a type annotation and is referenced directly or indirectly in its own initializer.ts(7022)
If an implicit any is going to be inferred, but foo has an initializer in the constructor, it should always infer the type from the initializer.
foo
Current Behavior
Proposed Behavior
If an implicit
anyis going to be inferred, butfoohas an initializer in the constructor, it should always infer the type from the initializer.