Closed
Description
TypeScript Version: 3.6.2
Search Terms:
noImplicitAny generic
Code
class Test<T> {
options: Map<T, string> = new Map()
constructor(options: Map<T, string>) {
}
}
let t = new Test(new Map())
t.options.set("a", "abc")
t.options.set(123, "abc")
Expected behavior:
When using strict / noImplicityAny I would expect that T which implicitly became any would be reported as an error.
Actual behavior:
No error thrown, T becomes of type any.