import type { AnyFn } from "#types/type-helpers"; import type { SetupServerApi } from "msw/node"; declare global { /** * Only used in testing. * Can technically be undefined/null but for ease of use we are going to assume it is always defined. * Used to load i18n files exclusively. * * To set up your own server in a test see `game-data.test.ts` */ var server: SetupServerApi; // Overloads for `Function.apply` and `Function.call` to add type safety on matching argument types interface Function { apply(this: T, thisArg: ThisParameterType, argArray: Parameters): ReturnType; call(this: T, thisArg: ThisParameterType, ...argArray: Parameters): ReturnType; } }