import { type TSESTree as es, TSESLint } from "@typescript-eslint/utils"; /** JavaScript function nodes that introduce a lexical function scope. */ type FunctionNode = es.ArrowFunctionExpression | es.FunctionDeclaration | es.FunctionExpression; /** Source-code abstraction used by the shared JSX and React helpers. */ type SourceCode = TSESLint.SourceCode; type Variable = TSESLint.Scope.Variable; /** Return whether a node introduces a JavaScript function scope. */ export declare const isFunctionNode: (node: Readonly) => node is Readonly; /** Remove transparent TypeScript and optional-chain wrappers from an expression. */ export declare const unwrapExpression: (expression: Readonly) => Readonly; /** Return a simple JSX tag name, or `undefined` for member/namespaced names. */ export declare const getSimpleJsxElementName: (node: Readonly) => string | undefined; /** React treats an ASCII-lowercase JSX identifier as a host/custom element. */ export declare const isIntrinsicJsxName: (name: string) => boolean; /** Return whether an opening element is component-like rather than intrinsic. */ export declare const isComponentOpeningElement: (node: Readonly) => boolean; /** Return a static JSX attribute name. */ export declare const getJsxAttributeName: (node: Readonly) => string | undefined; /** Find the nearest enclosing JavaScript function. */ export declare const getEnclosingFunction: (sourceCode: Readonly, node: Readonly) => Readonly | undefined; /** Find a lexical variable by walking the scope chain. */ export declare const findVariable: (sourceCode: Readonly, identifier: Readonly) => Readonly | undefined; /** * Resolve an identifier only when it has one `const` declarator in the same * function. Module constants and mutable/control-flow-dependent bindings are * deliberately excluded. */ export declare const getSameFunctionConstInitializer: (sourceCode: Readonly, identifier: Readonly) => Readonly | undefined; /** Return whether a function directly contains JSX, excluding nested functions. */ export declare const functionContainsJsx: (sourceCode: Readonly, node: Readonly) => boolean; /** Return a statically known class member name. */ export declare const getStaticClassMemberName: (node: Readonly) => string | undefined; /** Return the static terminal name of a direct/member call. */ export declare const getCallName: (node: Readonly) => string | undefined; /** Return whether a name follows React's conventional component casing. */ export declare const isComponentName: (name: string) => boolean; /** Return whether a name follows the conventional custom-hook shape. */ export declare const isHookName: (name: string) => boolean; /** Resolve an exact/glob boolean policy. Exact entries take precedence. */ export declare const getNamePolicy: (name: string, policies: Readonly>) => boolean | undefined; /** Return whether an identifier is not shadowed by a local declaration. */ export declare const isUnshadowedGlobalIdentifier: (sourceCode: Readonly, identifier: Readonly) => boolean; export type { FunctionNode, SourceCode }; //# sourceMappingURL=jsx-react-analysis.d.ts.map