/** * Pass #33: react-inline-jsx (category: performance) * * Detects inline object literals or arrow functions passed as JSX props. * These create a new reference on every render, defeating React.memo / * shouldComponentUpdate optimisations and causing unnecessary re-renders. * * Detection strategy: * 1. Only runs on JavaScript/TypeScript files that appear to contain JSX * (quick check: source contains a ` or propName={identifier => * c. Inline function prop: propName={function( * 3. Skips: * - `style={{` — idiomatic and near-impossible to hoist statically * - `key=` — must be inline * - `data-*` attribute names * - Lines that are comments * 4. Emits one finding per matched line. * * Languages: JavaScript and TypeScript only. */ import type { AnalysisPass, PassContext } from '../../graph/analysis-pass.js'; export interface ReactInlineJsxResult { inlineProps: Array<{ line: number; propName: string; kind: 'object' | 'arrow' | 'function'; }>; } export declare class ReactInlineJsxPass implements AnalysisPass { readonly name = "react-inline-jsx"; readonly category: "performance"; run(ctx: PassContext): ReactInlineJsxResult; } //# sourceMappingURL=react-inline-jsx-pass.d.ts.map