Files
reverse-engineering-anything/src/domain/managed/managedModuleIdentity.ts
T
morluto a4bf59f661 fix(managed): preserve Module identity with an unresolved name (#12265)
Admit exact string heap aliases and retain independent Module row facts for distinct declarations. Bind the optional partial row to the same scope checks as named Module Evidence.
2026-11-19 06:08:59 -05:00

22 lines
712 B
TypeScript

import type {
NamedManagedModule,
UnresolvedManagedModuleName,
} from "./managedArtifact.js";
export type ManagedModuleRow = NamedManagedModule | UnresolvedManagedModuleName;
export interface ManagedModuleEvidenceFacts {
readonly module?: NamedManagedModule | null;
readonly metadata?: {
readonly unresolved_module_name?: UnresolvedManagedModuleName;
readonly status: string;
readonly table_row_counts: Readonly<Record<string, number>>;
};
}
/** Select the sole admitted Module row shape, independent of its name. */
export const managedModuleRow = (
result: ManagedModuleEvidenceFacts,
): ManagedModuleRow | null =>
result.module ?? result.metadata?.unresolved_module_name ?? null;