_forEachLevel(hookMap, type, fn) {
		for (const hook of this._getAllLevelHooks(hookMap, type)) {
			const result = fn(/** @type {H} */ (hook));
			if (result !== undefined) return /** @type {R} */ (result);
		}
	}
Run `fn` for each level
@private
@template {StatsPrintHooks[keyof StatsPrintHooks]} HM
@template {HM extends HookMap<infer H> ? H : never} H
@template {H extends import("tapable").Hook<any, infer R> ? R : never} R
@param {HM} hookMap hook map
@param {string} type type
@param {(hooK: H) => R | undefined | void} fn fn
@returns {R | undefined} hook