From c1e78b439750a94559724a89e25155a4acddfa52 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Sun, 26 May 2024 19:50:16 -0300 Subject: [PATCH] hasOwn != in --- src/webpack/wreq.d.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/webpack/wreq.d.ts b/src/webpack/wreq.d.ts index e155f20cd..a491fc4af 100644 --- a/src/webpack/wreq.d.ts +++ b/src/webpack/wreq.d.ts @@ -63,7 +63,7 @@ export type WebpackRequire = ((moduleId: PropertyKey) => Module) & { * @example * const fromObject = { a: 1 }; * Object.keys(fromObject).forEach(key => { - * if (key !== "default" && !(key in toObject)) { + * if (key !== "default" && !Object.hasOwn(toObject, key) { * Object.defineProperty(toObject, key, { * get: () => fromObject[key], * enumerable: true @@ -121,7 +121,7 @@ export type WebpackRequire = ((moduleId: PropertyKey) => Module) & { * const exports = {}; * const definition = { exportName: () => someExportedValue }; * for (const key in definition) { - * if (key in definition && !(key in exports)) { + * if (Objeect.hasOwn(definition, key) && !Object.hasOwn(exports, key) { * Object.defineProperty(exports, key, { * get: definition[key], * enumerable: true