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
Conditional types are distributed across all types of a union. This is
not what we want in the case of Config. Distribution happens only over
"naked" type parameters and so wrapping the type in a 1-tuple as well as
the check type avoids this behavior. See:
microsoft/TypeScript#29368 (comment)
Before this change, the type of leaf nodes would resolve to:
{
Bluetooth: {
Allowed: (
Gettable<'False'> & Settable<'False'> & Listenable<'False'>
) | (
Gettable<'True'> & Settable<'True'> & Listenable<'True'>
)
}
}
whereas what we want is:
{
Bluetooth: {
Allowed: (
Gettable<'False' | 'True'> &
Settable<'False' | 'True'> &
Listenable<'False' | 'True'>
)
}
}
0 commit comments