Skip to content

Commit 6d48e10

Browse files
committed
Re-export types from babel
1 parent 1264f80 commit 6d48e10

2 files changed

Lines changed: 12 additions & 0 deletions

File tree

.changeset/heavy-plums-repair.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'react-docgen': minor
3+
---
4+
5+
The types `NodePath` and `babelTypes` are now exported.
6+
7+
These types are useful when building integrations in TypeScript.
8+
9+
`babelTypes` includes all types from `@babel/types`.

packages/react-docgen/src/main.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ function defaultParse(
6161
return parse(String(src), defaultConfig);
6262
}
6363

64+
export type { NodePath } from '@babel/traverse';
65+
export type * as babelTypes from '@babel/types';
66+
6467
export {
6568
builtinHandlers,
6669
builtinResolvers,

0 commit comments

Comments
 (0)