e part 2
This commit is contained in:
parent
8fd22f6deb
commit
9ada9bc1a9
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
|
||||
* const fromObject = { a: 1 };
|
||||
* Object.keys(fromObject).forEach(key => {
|
||||
* if (key !== "default" && !Object.hasOwn(toObject, key) {
|
||||
* 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 (Object.hasOwn(definition, key) && !Object.hasOwn(exports, key) {
|
||||
* if (Object.hasOwn(definition, key) && !Object.hasOwn(exports, key)) {
|
||||
* Object.defineProperty(exports, key, {
|
||||
* get: definition[key],
|
||||
* enumerable: true
|
||||
|
|
Loading…
Reference in a new issue