hasOwn != in
This commit is contained in:
parent
32a2c90761
commit
c1e78b4397
4
src/webpack/wreq.d.ts
vendored
4
src/webpack/wreq.d.ts
vendored
|
@ -63,7 +63,7 @@ export type WebpackRequire = ((moduleId: PropertyKey) => Module) & {
|
||||||
* @example
|
* @example
|
||||||
* const fromObject = { a: 1 };
|
* const fromObject = { a: 1 };
|
||||||
* Object.keys(fromObject).forEach(key => {
|
* Object.keys(fromObject).forEach(key => {
|
||||||
* if (key !== "default" && !(key in toObject)) {
|
* if (key !== "default" && !Object.hasOwn(toObject, key) {
|
||||||
* Object.defineProperty(toObject, key, {
|
* Object.defineProperty(toObject, key, {
|
||||||
* get: () => fromObject[key],
|
* get: () => fromObject[key],
|
||||||
* enumerable: true
|
* enumerable: true
|
||||||
|
@ -121,7 +121,7 @@ export type WebpackRequire = ((moduleId: PropertyKey) => Module) & {
|
||||||
* const exports = {};
|
* const exports = {};
|
||||||
* const definition = { exportName: () => someExportedValue };
|
* const definition = { exportName: () => someExportedValue };
|
||||||
* for (const key in definition) {
|
* 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, {
|
* Object.defineProperty(exports, key, {
|
||||||
* get: definition[key],
|
* get: definition[key],
|
||||||
* enumerable: true
|
* enumerable: true
|
||||||
|
|
Loading…
Reference in a new issue