ModuleShape
A module, as the analysis has it: its top-level declarations, what running it does, and what it exports.
import type { Unit } from "#codebase/tcmts/cli/npm"; export interface ModuleShape { units: Record<string, Unit>; /** its top-level code, which importing it runs */ top: Unit; exports: Record<string, { local?: string; from?: { spec: string; name: string } }>; /** `export * from` */ stars: string[]; /** CommonJS: `require`, `module.exports`, `exports.x`, read whole */ cjs: boolean; }