PackageJsonHandler
PackageJsonHandler<
J,C> = (json,args) =>Operation<PolicyResult> |Promise<PolicyResult>
Defined in: policyDefiners/definePackagePolicy.ts:30
A policy handler especially for policies that target package.json.
Type Parameters
Section titled “Type Parameters”J
C
Parameters
Section titled “Parameters”J
PolicyArgs<C>
Returns
Section titled “Returns”Operation<PolicyResult> | Promise<PolicyResult>
Remarks
Section titled “Remarks”Package JSON handlers can be implemented in two ways:
- As an async function returning a Promise
- As an Effection generator function returning an Operation
Both styles are supported to allow gradual migration and flexibility.