import type ts from 'typescript'; import type { Fix, Fixes } from './exports.js'; import type { IssueSymbol, SymbolType } from './issues.js'; export type Identifier = string; type FilePath = string; type NamespaceOrAlias = string; type Reference = string; type References = Set; type Tags = Set; export interface Position { pos: number; line: number; col: number; } export type IdToFileMap = Map>; export type IdToNsToFileMap = Map>>; export type ImportMaps = { refs: References; imported: IdToFileMap; importedAs: IdToNsToFileMap; importedNs: IdToFileMap; reExported: IdToFileMap; reExportedAs: IdToNsToFileMap; reExportedNs: IdToFileMap; }; export type ImportMap = Map; export interface Import extends Position { readonly specifier: string; readonly filePath: string | undefined; readonly identifier: string | undefined; readonly isTypeOnly: boolean; } export interface Export extends Position { readonly identifier: Identifier; readonly type: SymbolType; readonly members: ExportMember[]; readonly jsDocTags: Tags; self: [number, boolean]; readonly fixes: Fixes; symbol: undefined | ts.Symbol; readonly isReExport: boolean; } export type ExportMember = { readonly identifier: Identifier; readonly pos: number; readonly line: number; readonly col: number; readonly type: SymbolType; readonly fix: Fix; readonly jsDocTags: Tags; readonly flags: number; self: [number, boolean]; symbol: undefined | ts.Symbol; }; export type ExportMap = Map; export type Imports = Set; export type FileNode = { imports: { readonly internal: ImportMap; readonly external: Set; unresolved: Set; readonly programFiles: Set; readonly entryFiles: Set; readonly imports: Imports; }; exports: ExportMap; duplicates: Iterable>; scripts: Set; imported: undefined | ImportMaps; internalImportCache: undefined | ImportMap; }; export type ModuleGraph = Map; export {};