Skip to content

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.

J

C

J

PolicyArgs<C>

Operation<PolicyResult> | Promise<PolicyResult>

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.