-
Notifications
You must be signed in to change notification settings - Fork 9.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core(fr): fix usage of distributed conditional type #12565
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice hunting it down! 🎉
types/gatherer.d.ts
Outdated
@@ -45,7 +45,7 @@ declare global { | |||
/** The cached results of computed artifacts. */ | |||
computedCache: Map<string, ArbitraryEqualityMap>; | |||
/** The set of available dependencies requested by the current gatherer. */ | |||
dependencies: TDependencies extends DefaultDependenciesKey ? | |||
dependencies: [TDependencies] extends [DefaultDependenciesKey] ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DefaultDependenciesKey
isn't actually a union, just an alias, so I wouldn't expect to need brackets around that.
dependencies: [TDependencies] extends [DefaultDependenciesKey] ? | |
dependencies: [TDependencies] extends DefaultDependenciesKey ? |
btw I think this exposes a real type failure in the places where we assumed |
These were the issues that appeared when we removed the condition. I'm gonna try removing the condition to see if that works. |
Incorrect behavior when defining multiple dependencies in
FRTransitionalContext
. This was caused by distributed conditional types.