@types/babel-plugin-react-docgen
TypeScript icon, indicating that this package has built-in type declarations

4.2.3 • Public • Published

Installation

npm install --save @types/babel-plugin-react-docgen

Summary

This package contains type definitions for babel-plugin-react-docgen (https://github.com/storybookjs/babel-plugin-react-docgen).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/babel-plugin-react-docgen.

index.d.ts

type BabelPluginObj = any;

// from react-docgen parse.ts
export type Importer = (path: any, name: string) => any;
export type Handler = (documentation: any, path: any, importer: Importer) => void;
export type Resolver = (node: any, parser: any, importer: Importer) => any;

export interface Options {
    resolver?:
        | "findAllComponentDefinitions"
        | "findAllExportedComponentDefinitions"
        | "findExportedComponentDefinition"
        | Resolver;
    handlers?: Array<string | Handler>;
    removeMethods?: boolean;
    DOC_GEN_COLLECTION_NAME?: string;
}

declare function babelPluginReactDocgen(babelApi: any): BabelPluginObj;
export default babelPluginReactDocgen;

export interface ComponentType {
    // DocumentationObject
    __docgenInfo: any;
}

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:04 GMT
  • Dependencies: none

Credits

These definitions were written by Emily Klassen.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/babel-plugin-react-docgen

Weekly Downloads

966

Version

4.2.3

License

MIT

Unpacked Size

4.23 kB

Total Files

5

Last publish

Collaborators

  • types