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
The union type for Subject appears to be incorrect when different subjcts have different actions.
To Reproduce
typeAbilities=["create"|"manage","campaign"]|["create"|"delete","user:invite"]constability=createMongoAbility<Abilities>();// Intellisense suggests this, but TS actually errors indicating this is incorrect (which it is)ability.can('delete','campaign')// This is correctability.can('delete','user:invite')
Expected behavior
The union type for subject should be impacted by the action, and not suggest subjects that are not valid for a given action.