Skip to content

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 ​

inspect

Properties ​

name ​

name: string

The name of this plugin.


config? ​

optional config?: (options: ResolvedInspectionOptions) => void

A hook that configures the inspection options before any values are inspected.

Parameters ​

options ​

ResolvedInspectionOptions

The current inspection options.

Returns ​

void


first? ​

optional first?: (input: unknown, context: ResolvedInspectionOptions) => string | undefined

A hook that is called before a value is inspected.

Parameters ​

input ​

unknown

The input value.

context ​

ResolvedInspectionOptions

The inspection context.

Returns ​

string | undefined


fallback? ​

optional fallback?: (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 ​

ResolvedInspectionOptions

The inspection context.

Returns ​

string | undefined

Built by Prozilla