isReactCreateClassCall.d.ts 437 B

12345678910111213
  1. import type { NodePath } from '@babel/traverse';
  2. import type { CallExpression } from '@babel/types';
  3. /**
  4. * Returns true if the expression is a function call of the form
  5. * `React.createClass(...)` or
  6. * ```
  7. * import createReactClass from 'create-react-class';
  8. * createReactClass(...);
  9. * ```
  10. */
  11. export default function isReactCreateClassCall(path: NodePath): path is NodePath<CallExpression & {
  12. __reactBuiltinTypeHint: true;
  13. }>;