Interface InspectionPlugin
Source: inspect.ts
A plugin for the inspection utilities.
Can be used to extend, override or configure the inspection process. Hook methods are called at different stages of the process and can seamlessly interact with it.
This is heavily inspired by Vite's plugin API and follows a similar pattern.
See
Properties
name
name:
string
The name of this plugin.
config?
optionalconfig?: (options:ResolvedInspectionOptions) =>void
A hook that configures the inspection options before any values are inspected.
Parameters
options
The current inspection options.
Returns
void
first?
optionalfirst?: (input:unknown,context:ResolvedInspectionOptions) =>string|undefined
A hook that is called before a value is inspected.
Parameters
input
unknown
The input value.
context
The inspection context.
Returns
string | undefined
fallback?
optionalfallback?: (input:unknown,context:ResolvedInspectionOptions) =>string|undefined
A hook that is called if a value could not be inspected.
Parameters
input
unknown
The input value.
context
The inspection context.
Returns
string | undefined