pokerogue/test/test-utils/helpers
Sirz Benjie e5e0835a96
[Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547)
* make IVs use Uint8Array

* Add many typed array helpers

* Move array utils to its own file

* Add suppression comment

* Adjust type of `getStats`

* Adjust test mocks to use typed arrays

* Adjust signatures of some phases to use ArrayLike<T>

* Adjust signature of src/ui/containers/stats-container#updateIvs

* Remove comment gap to try to satisfy typedoc

* Ensure ivs are always set

* fix: fun-and-games me to use typed array

* Add new tests for array utilities

* Update type of ivs in save-data.ts

* Update part-timer-encounter.test.ts

* Convert uses of StatusEffect[] to Uint8Array

* Update ssui to use uint8array for ivs

* Revert use of typed arrays

* Move `nil` to @types/common

* Make more arrays readonly

* fix: remnant change to immune effects

* Even more array improvements

* Apply kev's suggestions from code review

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>

* address Bertie's comments from code review

* tests: remove undefined check for bigint array types

* fixup abilities.ts

---------

Co-authored-by: NightKev <34855794+DayKev@users.noreply.github.com>
2025-10-06 12:21:58 -05:00
..
challenge-mode-helper.ts [Refactor] Refactor Starter and its handling (#6477) 2025-09-21 11:07:08 -07:00
classic-mode-helper.ts [Refactor] Refactor Starter and its handling (#6477) 2025-09-21 11:07:08 -07:00
daily-mode-helper.ts [Misc] Simplifying imports of UI files (#6542) 2025-09-11 00:30:17 -07:00
field-helper.ts [Balance] Enemy trainer Pokemon will have friendship based on the wave 2025-10-03 12:09:35 -04:00
game-manager-helper.ts [Misc] Standardize-file-names (#6137) 2025-07-24 16:38:31 -04:00
modifiers-helper.ts [Test] Added Map key matcher; enforced strong typing on matchers (#6561) 2025-09-20 17:24:27 -05:00
move-helper.ts [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
overrides-helper.ts [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
reload-helper.ts [Refactor] Move type definitions away from game-data.ts (#6487) 2025-09-10 14:09:33 -05:00
settings-helper.ts [Test] Revamped MockConsoleLog with color support (#6218) 2025-09-07 09:18:47 -05:00