Open
Description
TypeScript Version: 3.5.3
Search Terms:
ts-ignore in class constructor
class method no error on parameter usage
Code
class Foo {
bar: string
constructor(bar: string) {
this.bar = bar
}
baz(buzz: number) {
return buzz + 1
}
}
// @ts-ignore
const instance = new Foo()
instance.baz('buzz')
Expected behavior:
The invocation of instance.baz('buzz')
should report that the parameter should be a number
instead of a string
.
Actual behavior:
There is no error on that line.
If I fix the ts-ignore on the line above, it then reports the error correctly.
Related Issues:
Could not find any through Google or here.