isReactComponentClass.d.ts 403 B

1234567
  1. import type { NodePath } from '@babel/traverse';
  2. import 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. */
  7. export default function isReactComponentClass(path: NodePath): path is NodePath<ClassDeclaration | ClassExpression>;