UNPKG

1.19 kBTypeScriptView Raw
1import ChainResolver from './ChainResolver.js';
2import FindAllDefinitionsResolver from './FindAllDefinitionsResolver.js';
3import FindAnnotatedDefinitionsResolver from './FindAnnotatedDefinitionsResolver.js';
4import FindExportedDefinitionsResolver from './FindExportedDefinitionsResolver.js';
5import type { NodePath } from '@babel/traverse';
6import type FileState from '../FileState.js';
7import type { ArrowFunctionExpression, CallExpression, ClassDeclaration, ClassExpression, FunctionDeclaration, FunctionExpression, ObjectExpression, ObjectMethod } from '@babel/types';
8export type StatelessComponentNode = ArrowFunctionExpression | FunctionDeclaration | FunctionExpression | ObjectMethod;
9export type ComponentNode = CallExpression | ClassDeclaration | ClassExpression | ObjectExpression | StatelessComponentNode;
10export type ComponentNodePath = NodePath<ComponentNode>;
11export type ResolverFunction = (file: FileState) => ComponentNodePath[];
12export interface ResolverClass {
13 resolve: ResolverFunction;
14}
15export type Resolver = ResolverClass | ResolverFunction;
16export { FindAllDefinitionsResolver, FindAnnotatedDefinitionsResolver, FindExportedDefinitionsResolver, ChainResolver, };