decodeOverlayOptions = (overlayOptions) => {
  if (typeof overlayOptions === "object") {
    ["warnings", "errors", "runtimeErrors"].forEach((property) => {
      if (typeof overlayOptions[property] === "string") {
        const overlayFilterFunctionString = decodeURIComponent(
          overlayOptions[property],
        );

        // eslint-disable-next-line no-new-func
        overlayOptions[property] = new Function(
          "message",
          `var callback = ${overlayFilterFunctionString}
        return callback(message)`,
        );
      }
    });
  }
}
@param {boolean | { warnings?: boolean | string; errors?: boolean | string; runtimeErrors?: boolean | string; }} overlayOptions