
//#region ../chokidar/dist/esm/utils/resolveObjectPromises.mjs
/**
* A more "unified" approach where each type (function, array, object, primitive)
* is handled inside the main recursive body.
*/
const resolveObjectPromises = async (entry) => {
	if (entry && typeof entry.then === "function") return resolveObjectPromises(await entry);
	if (typeof entry === "function") return resolveObjectPromises(entry());
	if (Array.isArray(entry)) return Promise.all(entry.map(async (item) => resolveObjectPromises(item)));
	if (entry && typeof entry === "object") {
		const result = {};
		for (const key of Object.keys(entry)) result[key] = await resolveObjectPromises(entry[key]);
		return result;
	}
	return entry;
};

//#endregion
exports.resolveObjectPromises = resolveObjectPromises;
//# sourceMappingURL=resolveObjectPromises.cjs.map