Skip to content

composePolicies

function composePolicies(...policies): Policy;

First policy to return a non-allow decision wins, in order. deny from an earlier policy is not overridable by a later one — a composed policy can only ever be more restrictive than its parts, which is the property that makes composition safe to reason about.

Parameter Type

policies

readonly Policy[]

Policy