conflictedUses
uses tcmts.cli.main.pathsIn, which uses tcmts.core.ts.parse, which uses tcmts.core.ts.compiler, which uses process
The conflicted names a scratch file uses (imports), but those it holds: until they're settled it can't typecheck, as a conflicted name isn't one definition to check it against.
import type { Codebase } from "#codebase/tcmts/cli/codebase"; import { importedPaths, pathsIn } from "#codebase/tcmts/cli/main"; import { conflictAt } from "#codebase/tcmts/cli/merge"; export function conflictedUses(cb: Codebase, file: string, text: string): string[] { const here = new Set(pathsIn(file, text, undefined)); return [...new Set(importedPaths(file, text))].filter( (p) => !here.has(p) && conflictAt(cb, p) !== undefined, ); }
uses
- tcmts.cli.codebase.Codebase
- tcmts.cli.main.importedPaths
- tcmts.cli.main.pathsIn
- tcmts.cli.merge.conflictAt