src/utils/isReactForwardRefCall.ts (9 lines of code) (raw):

import isReactBuiltinCall from './isReactBuiltinCall'; import type { Importer } from '../parse'; import type { NodePath } from 'ast-types/lib/node-path'; /** * Returns true if the expression is a function call of the form * `React.forwardRef(...)`. */ export default function isReactForwardRefCall( path: NodePath, importer: Importer, ): boolean { return isReactBuiltinCall(path, 'forwardRef', importer); }