You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I thought that it might have been just fixed by #57403 but it didn't π My suspicion is that this PR is crucial for fixing this - maybe it just missed something.
Bug Report
π Search Terms
type parameter leaks out
π Version & Regression Information
In the TS playground, the first version that shows the bug is 3.5.1. Version 3.3.3 also behaves incorrectly, but in a different way.
β― Playground Link
Playground link with relevant code
π» Code
π Actual behavior
The
added2.foo
expression reports a type error:The
index.d.ts
generated from this source has a declaration foraddP2
that contains an undefined identifierP
:On the other hand, the
addP1
version works well:The only difference is that
withP2
calls an additionalcreateTransformer
function which is an identity.π Expected behavior
Both
P1
andP2
versions behave the same way and infer the return type correctly, without leaking theP
type parameter.The text was updated successfully, but these errors were encountered: