Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Conflicting definitions for Set constructor causes unexpected default generic in TS 3.5 #31990
TypeScript Version: 3.4.5 vs versions after 3.5
Search Terms: set constructor setconstructor unknown
let s = new Set();
In TS 3.4: we expect the default chosen param to give us a
Or, if Set has a default generic arg, I expect the same default chosen in 3.4 and 3.5.
In TS 3.4, this actually was a
It appears there are multiple overloads of the Set constructor.
while lib.es2105.iterable.d.ts says:
Note that one has
So somehow TS 3.4 vs TS 3.5 decided to change whether to obey the
Just to restate, what I am concerned about here is whether "new Set()" is supposed to give you a
I believe the intention was for 3.5 change it to
Circling back on this -- I think maybe I failed to communicate the bug here.
In practice, TS3.4 => TS3.5 changed what
But the actual bug here is that I think you didn't change the definition of Set! It still says