Skip to content
function since v0.1

onProviderUsed

Called just before Oh My Prvd returns a used provider. Handlers are expected to be infallible and non-yielding. The handler receives the used provider.

function prvd.onProviderUsed(
  handler: (Provider<unknown>) -> ()
) -> (),
export const onProviderUsed: (
  handler: (provider: Provider<object>) => void,
) => void

Parameters

handler : (Provider<unknown>) -> void

A handler that is called when a provider has been used. It receives the target provider.