5.0: An opaque type from other modules isn't inferred correctly #53581
Labels
Bug
A bug in TypeScript
Domain: Quick Info
e.g. hover text, tool-tips, and tooltips.
Help Wanted
You can do this
Milestone
Bug Report
π Search Terms
π Version & Regression Information
β― Playground Link
Playground (v5.0.2)
π» Code
The opaque type that I borrowed from:
π Actual behavior
The type of
q
is annotated correctly,Query<{}, {}>
while the declaration ofQuery
is on the same file. However, when I moved it to another file, theq
is inferred asQuery<_V, _R>
. It is not reproduced on v4.9.5.π Expected behavior
The type of
q
should be inferred asQuery<{}, {}>
wherever the declaration ofQuery
is located.The text was updated successfully, but these errors were encountered: