ScopeRule<Scopes, Grants>
ScopeRule<
Scopes,Grants> ={ [K in keyof Scopes]: { key: K; type: "scope"; value: Scopes[K] extends boolean ? true : Scopes[K] } }[keyofScopes] | {grant:Grants;type:"grant"; }
Utility type that enforces boolean scopes must be true. For non-boolean scopes, preserves the original type.
Type Parameters
| Type Parameter |
|---|
|
|
|
|