The target a route-level policy check evaluates against: a fixed value, or
an extractor called per request — reading a route parameter, or loading the
record. A FUNCTION is always treated as an extractor; a policy whose target
is itself a function wraps it. An extractor may answer undefined — a
record that was not found — which the check receives as it receives an
omitted target, since every check's target is already T | undefined.
Shared by AuthPlugin's requirePolicy and DecoratorPlugin's @RequirePolicy, so the
two entry points accept the same targets.
The target a route-level policy check evaluates against: a fixed value, or an extractor called per request — reading a route parameter, or loading the record. A FUNCTION is always treated as an extractor; a policy whose target is itself a function wraps it. An extractor may answer
undefined— a record that was not found — which the check receives as it receives an omitted target, since every check's target is alreadyT | undefined.Shared by AuthPlugin's
requirePolicyand DecoratorPlugin's@RequirePolicy, so the two entry points accept the same targets.