refactor: declare GM_fetch as global for typescript

important for the compiler when mocking for unit tests
This commit is contained in:
xenticore
2025-03-28 22:52:42 -04:00
parent 7465d6ce8d
commit 8b2bf38eff
2 changed files with 8 additions and 0 deletions

7
global.d.ts vendored Normal file
View File

@@ -0,0 +1,7 @@
export {};
declare global {
interface Window {
GM_fetch: typeof fetch; // or a more specific custom type
}
}

View File

@@ -1,4 +1,5 @@
{
"include": ["src/**/*", "declarations.d.ts", "global.d.ts"],
"compilerOptions": {
"outDir": "./dist/",
"noImplicitAny": true,