import type { SourceFile } from 'typescript'; import type { Typescript } from '../../build/utils/import-typescript'; import type { StratoInstance } from './report-strato-components'; /** A binding imported into a module: `import { imported as local } from module`. */ type ImportRef = { module: string; imported: string; }; /** A single parsed module: its named imports plus every module specifier it links to. */ type LoadedModule = { file: string; sourceFile: SourceFile; /** Import bindings keyed by local name — used to classify a JSX tag as strato. */ imports: Map; /** Every module specifier this module imports or re-exports from — the graph edges to follow. */ edges: string[]; }; /** * Walks the entire module graph of a third-party `@dynatrace` package and returns one record * per strato-component JSX instance rendered anywhere inside it, each attributed to the package * (`wrapperPackage = packageName`). The package's own components are never reported — only the * strato components they render. * * Unlike a render-tree descent from a single component, this follows the *static module graph* * (entry points + relative / same-package imports and re-exports) and inspects every module's * JSX directly. That is what lets it see strato usage the app can't reach through the type * checker: components selected at runtime from a registry (`config.resultComponent`) or exposed * only through compound/dot-notation tags (``) still live in a statically-imported * module, so walking the graph reaches them regardless of how they are dispatched at runtime. * * Works on the package's compiled output (jsx()/jsxs() factory calls) as well as plain TS/TSX * source, because third-party packages such as `@dynatrace/data-exploration` ship compiled JS. */ export declare function collectPackageStratoUsages(packageName: string, appRoot: string, ts: Typescript, moduleCache?: Map): StratoInstance[]; export {};