Bug Report
🔎 Search Terms
- unique symbol
- type inference
- opaque
🕗 Version & Regression Information
- This changed between versions v4.9.5 and v5.0.2
- The nightly build also has the bug
⏯ Playground Link
Playground (v5.0.2)
💻 Code
declareconsttag: unique symbol;typeTagged<Token>={readonly[tag]?: Token;};exporttypeOpaque<Type,Token=unknown>=Type&Tagged<Token>;exporttypeQuery<_V,_R>=Opaque<string>;constq: Query<{},{}>='query {}'The opaque type that I borrowed from:
🙁 Actual behavior
The type of q is annotated correctly, Query<{}, {}> while the declaration of Query is on the same file. However, when I moved it to another file, the q is inferred as Query<_V, _R>. It is not reproduced on v4.9.5.
🙂 Expected behavior
The type of q should be inferred as Query<{}, {}> wherever the declaration of Query is located.
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
qis annotated correctly,Query<{}, {}>while the declaration ofQueryis on the same file. However, when I moved it to another file, theqis inferred asQuery<_V, _R>. It is not reproduced on v4.9.5.🙂 Expected behavior
The type of
qshould be inferred asQuery<{}, {}>wherever the declaration ofQueryis located.