ImpliedAuthFields<T>: ImpliedAuthField<T> extends never
    ? never
    : UnionToIntersection<ImpliedAuthField<T>>

Turns the type from a list of Authorization rules like this:

[
allow.public(),
allow.ownerDefinedIn('otherfield'),
allow.ownersDefinedIn('editors')
]

Into an object type that includes all auth fields like this:

{
owner?: string | undefined;
otherfield?: string | undefined;
editors?: string[] | undefined;
}

Type Parameters