import { t as createDebug } from "./node-Cb5OsnKg.js";

//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.22.1_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_d2e4a246ecba2d40b4415d1b79df8dc9/node_modules/rolldown-plugin-dts/dist/tsc-context.mjs
const path = globalThis.process.getBuiltinModule("node:path");
const debug = createDebug("rolldown-plugin-dts:tsc-context");
function createContext() {
	return {
		programs: [],
		files: /* @__PURE__ */ new Map(),
		projects: /* @__PURE__ */ new Map()
	};
}
function invalidateContextFile(context, file) {
	file = path.resolve(file).replaceAll("\\", "/");
	debug(`invalidating context file: ${file}`);
	context.files.delete(file);
	context.programs = context.programs.filter((program) => {
		return !program.getSourceFiles().some((sourceFile) => sourceFile.fileName === file);
	});
	context.projects.clear();
}
const globalContext = createContext();

//#endregion
export { globalContext as n, invalidateContextFile as r, createContext as t };