-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Labels
scope:pluginplugin implementationplugin implementationstatus:mergedmerged, but not releasedmerged, but not releasedstatus:prereleasedmerged and prereleasedmerged and prereleasedtype:taskproject tasksproject tasks
Description
Proposed work
implementing plugin options.
the options interface will extend ParserOptions
as well as add several new options:
apply?
: conditional applicationenforce?
: plugin orderingexclude?
: glob patterns matching files to exclude from parsing. Applied afterinclude
handler?
: augmentComponentDoc
before added to a component as__docgenInfo
include?
: glob patterns matching files to parse for docgen informationname?
: generate the name of the component to add a__docgenInfo
property totsconfig?
: name of tsconfig file or path to tsconfig file
Success criteria
-
interface Options extends ParserOptions
-
apply?
-
enforce?
-
exclude?
-
handler?
-
include?
-
name?
-
tsconfig?
Related documents
- interface draft
import type { ComponentDoc, ParserOptions } from 'react-docgen-typescript' interface Options extends ParserOptions { apply?: Plugin['apply'] /** @default 'pre' */ enforce?: Plugin['enforce'] /** @default [] */ exclude?: string[] /** @default doc=>doc */ handler?(doc: ComponentDoc, code: string, id: string): ComponentDoc | Promise<ComponentDoc> /** @default ['**.tsx'] */ include?: string[] /** @default doc=>doc.displayName */ name?(doc: ComponentDoc, code: string, id: string): Promise<string> | string /** @default path.resolve('tsconfig.json') */ tsconfig?: string }
- Vite Plugin API
Metadata
Metadata
Assignees
Labels
scope:pluginplugin implementationplugin implementationstatus:mergedmerged, but not releasedmerged, but not releasedstatus:prereleasedmerged and prereleasedmerged and prereleasedtype:taskproject tasksproject tasks
Type
Projects
Status
✅ Done