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

//#region ../../node_modules/.pnpm/rolldown-plugin-dts@0.21.7_@typescript+native-preview@7.0.0-dev.20260122.2_oxc-resolver_6ee2f4f55d91906623f5bd81116dd39c/node_modules/rolldown-plugin-dts/dist/context-DoVwxr5H.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 };