mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-08-06 15:39:27 +02:00
* Partially ported over pkty matchers (WIP) * Cleaned up some more matchers * Fiexd up matchers * Fixed up remaining matchers * Removed the word "matcher" from the pkty matcher functions If we want them back we can always undo this commit and convert the other custom ones * Added wip spite test * Added `toHaveUsedPP` matcher * Fixed up docs and tests * Fixed spite test * Ran biome * Apply Biome * Reverted biome breaking i18next * Update src/typings/i18next.d.ts comment * Fixed log message to not be overly verbose * Added option to check for all PP used in pp matcher + cleaned up grudge tests * Fixed up tests * Fixed tests and such * Fix various TSDocs + missing TSDoc imports
21 lines
752 B
TypeScript
21 lines
752 B
TypeScript
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<T extends AnyFn>(this: T, thisArg: ThisParameterType<T>, argArray: Parameters<T>): ReturnType<T>;
|
|
|
|
call<T extends AnyFn>(this: T, thisArg: ThisParameterType<T>, ...argArray: Parameters<T>): ReturnType<T>;
|
|
}
|
|
}
|