UNPKG

403 BTypeScriptView Raw
1import type { NodePath } from '@babel/traverse';
2import type { ClassDeclaration, ClassExpression } from '@babel/types';
3/**
4 * Returns `true` of the path represents a class definition which either extends
5 * `React.Component` or has a superclass and implements a `render()` method.
6 */
7export default function isReactComponentClass(path: NodePath): path is NodePath<ClassDeclaration | ClassExpression>;