From 9e998db456e13f1f1479928a06ea1b6d3f8859a3 Mon Sep 17 00:00:00 2001 From: Nuckyz <61953774+Nuckyz@users.noreply.github.com> Date: Fri, 28 Jun 2024 19:03:09 -0300 Subject: [PATCH] typings --- src/plugins/_core/noTrack.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/plugins/_core/noTrack.ts b/src/plugins/_core/noTrack.ts index b94a91092..901e2da74 100644 --- a/src/plugins/_core/noTrack.ts +++ b/src/plugins/_core/noTrack.ts @@ -20,6 +20,7 @@ import { definePluginSettings } from "@api/Settings"; import { Devs } from "@utils/constants"; import { Logger } from "@utils/Logger"; import definePlugin, { OptionType, StartAt } from "@utils/types"; +import { WebpackRequire } from "webpack"; const settings = definePluginSettings({ disableAnalytics: { @@ -82,9 +83,9 @@ export default definePlugin({ Object.defineProperty(Function.prototype, "g", { configurable: true, - set(v: any) { + set(this: WebpackRequire, globalObj: WebpackRequire["g"]) { Object.defineProperty(this, "g", { - value: v, + value: globalObj, configurable: true, enumerable: true, writable: true @@ -101,7 +102,7 @@ export default definePlugin({ Object.defineProperty(Object.prototype, cacheExtractSym, { configurable: true, - get() { + get(this: WebpackRequire["c"]) { // One more condition to check if this is the Sentry WebpackInstance if (Array.isArray(this)) { return { exports: {} };