fix lazyWebpack.construct, lint uwuify

This commit is contained in:
Vendicated 2022-10-08 21:11:14 +02:00
parent b101e643d5
commit e0bbdd89bd
No known key found for this signature in database
GPG key ID: EC781ADFB93EFFA3
2 changed files with 38 additions and 39 deletions

View file

@ -25,7 +25,7 @@ export function lazyWebpack<T = any>(filter: FilterFn): T {
has: (_, prop) => prop in getMod(),
apply: (_, $this, args) => (getMod() as Function).apply($this, args),
ownKeys: () => Reflect.ownKeys(getMod()),
construct: (_, args, newTarget) => new newTarget(...args),
construct: (_, args, newTarget) => Reflect.construct(getMod(), args, newTarget),
deleteProperty: (_, prop) => delete getMod()[prop],
defineProperty: (_, property, attributes) => !!Object.defineProperty(getMod(), property, attributes)
}) as T;