Metakit / @doeixd/metakit/prove
policyConsistent
function · packages/metakit/src/prove/policy.ts:69
function policyConsistent<
Row,
Principal,
Rules extends Readonly<
Record<string, Expr.Expr<Policy.PolicyEnv<Row, Principal>, boolean>>
>,
>(
pol: Policy.Definition<Row, Principal, Rules>,
rule: NoInfer<Policy.RuleOf<Rules>>,
options?: ProveOptions,
): Effect.Effect<Proof, SolverUnavailableError>Whether rule, one of pol.rules, can allow anything: True with a rule
some environment satisfies, False for a rule none does (a dead rule), and
Unknown where an opaque term or the solver leaves it undecided. A rule of
another policy throws.