/**
 * Qt 5.15 WebEngine ≈ Chromium 87 — no Object.hasOwn (ES2022 / Chrome 93+).
 * smol-toml calls Object.hasOwn during parse/stringify; load this module before any TOML code.
 */
type ObjectMaybeHasOwn = ObjectConstructor & {
  hasOwn?(o: object, p: PropertyKey): boolean;
};
const O = Object as ObjectMaybeHasOwn;
if (typeof O.hasOwn !== 'function') {
  Object.defineProperty(Object, 'hasOwn', {
    value: (obj: object, prop: PropertyKey) =>
      Object.prototype.hasOwnProperty.call(obj, prop),
    writable: true,
    configurable: true,
  });
}
