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
// What you wantexporttypeAnyMutateInPath<Docextendsobject,OpcodeextendsMutateInSpecOpcode=MutateInSpecOpcode>=Docextendsunknown ?
Opcodeextendsunknown ?
MutateInPath<Doc,Opcode> :
never :
never;// What you getexporttypeAnyMutateInPath<Docextendsobject,OpcodeextendsMutateInSpecOpcode=MutateInSpecOpcode>=Docextendsunknown ? (Opcodeextendsunknown ? MutateInPath<Doc,Opcode> : never) : never;
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
What about some nice rules for nested conditional types ?
Let's see some examples :
That's... a disaster.
I have identified two cases for nested generics :
1. Every check begins with the same type
2. Every check is different
What do you think ?
Beta Was this translation helpful? Give feedback.
All reactions