Skip to content

Commit

Permalink
Expose more Typescript types (#969)
Browse files Browse the repository at this point in the history
  • Loading branch information
christon88 authored Jan 24, 2025
1 parent f9fc65e commit 639bf37
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 18 deletions.
5 changes: 5 additions & 0 deletions .changeset/curvy-roses-deny.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"react-docgen": patch
---

Expose more TypeScript types
64 changes: 46 additions & 18 deletions packages/react-docgen/src/main.ts
Original file line number Diff line number Diff line change
@@ -1,25 +1,40 @@
import type DocumentationBuilder from './Documentation.js';
import type {
BaseType,
Documentation,
ElementsType,
FunctionArgumentType,
FunctionSignatureType,
LiteralType,
MethodParameter,
MethodReturn,
ObjectSignatureType,
PropDescriptor,
PropTypeDescriptor,
SimpleType,
TSFunctionSignatureType,
TypeDescriptor,
} from './Documentation.js';
import type FileState from './FileState.js';
import type { Config } from './config.js';
import { createConfig, defaultHandlers } from './config.js';
import { ERROR_CODES } from './error.js';
import type { Handler } from './handlers/index.js';
import * as builtinHandlers from './handlers/index.js';
import parse from './parse.js';
import * as builtinResolvers from './resolver/index.js';
import type { Importer } from './importer/index.js';
import {
fsImporter,
ignoreImporter,
makeFsImporter,
} from './importer/index.js';
import * as utils from './utils/index.js';
import type { Documentation } from './Documentation.js';
import type DocumentationBuilder from './Documentation.js';
import parse from './parse.js';
import type {
Resolver,
ResolverClass,
ResolverFunction,
} from './resolver/index.js';
import type { Importer } from './importer/index.js';
import type { Handler } from './handlers/index.js';
import type FileState from './FileState.js';
import type { Config } from './config.js';
import { createConfig, defaultHandlers } from './config.js';
import { ERROR_CODES } from './error.js';
import * as builtinResolvers from './resolver/index.js';
import * as utils from './utils/index.js';

const builtinImporters = {
fsImporter,
Expand Down Expand Up @@ -66,23 +81,36 @@ export type * as babelTypes from '@babel/types';

export {
builtinHandlers,
builtinResolvers,
builtinImporters,
builtinResolvers,
defaultHandlers,
ERROR_CODES,
makeFsImporter,
defaultParse as parse,
utils,
ERROR_CODES,
};

export type {
Importer,
BaseType,
Config,
Documentation,
DocumentationBuilder,
ElementsType,
FileState,
FunctionArgumentType,
FunctionSignatureType,
Handler,
Importer,
LiteralType,
MethodParameter,
MethodReturn,
ObjectSignatureType,
PropDescriptor,
PropTypeDescriptor,
Resolver,
ResolverClass,
ResolverFunction,
FileState,
Config,
Documentation,
DocumentationBuilder,
SimpleType,
TSFunctionSignatureType,
TypeDescriptor,
};

0 comments on commit 639bf37

Please sign in to comment.