pokerogue/src
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
..
@types [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
ai fix: forced stab move not using proper weights 2025-10-05 10:49:17 -05:00
configs/inputs [Dev] Migrated to Biome 2.2.3, added more rules (#6259) 2025-09-08 10:35:18 -05:00
constants [Bug] [Docs] Fix @module tags (#6557) 2025-09-14 22:35:12 -05:00
data [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
enums [Dev] Improve typescript performance and version bump node and dependencies (#6627) 2025-10-04 19:29:23 -05:00
events [UI/UX] Show correct max duration in flyout (#6566) 2025-09-18 13:35:22 -07:00
field [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
global-vars [Refactor] Merged interfaces/ into @types/; removed runtime orphan modules 2025-06-07 17:28:01 -07:00
init [Dev] Improve typescript performance and version bump node and dependencies (#6627) 2025-10-04 19:29:23 -05:00
modifier [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
phases [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
pipelines Revert "[Refactor] Add TIME_OF_DAY_OVERRIDE & refactor arena tint code" 2025-09-27 14:55:59 -07:00
plugins [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
queues [Misc/Feature] Add dynamic turn order (#6036) 2025-09-20 17:49:40 -05:00
sprites [Refactor] Remove isNullOrUndefined in favor of loose check against null (#6549) 2025-09-12 14:53:27 -05:00
system [Dev] Don't use "production" mode for beta server (#6616) 2025-10-05 06:33:57 -07:00
typings [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
ui [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
utils [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
account.ts [Bug] [Beta] Fix renaming runs (#6268) 2025-08-14 16:57:01 -05:00
battle-scene.ts [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
battle.ts [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
constants.ts [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
dynamic-queue-manager.ts [Misc] Blacklist more dynamic phases (#6585) 2025-09-21 12:05:13 -07:00
game-mode.ts [Refactor] Remove isNullOrUndefined in favor of loose check against null (#6549) 2025-09-12 14:53:27 -05:00
global-event-manager.ts [Dev] Enable Biome import sorting (#6052) 2025-07-13 00:21:25 -07:00
global-scene.ts [Dev] Enable Biome import sorting (#6052) 2025-07-13 00:21:25 -07:00
inputs-controller.ts [Dev] Migrated to Biome 2.2.3, added more rules (#6259) 2025-09-08 10:35:18 -05:00
loading-scene.ts [UI/UX] Add language selection to login screen (#6302) 2025-09-10 13:53:57 -05:00
main.ts [Dev] Migrated to Biome 2.2.3, added more rules (#6259) 2025-09-08 10:35:18 -05:00
messages.ts [Docs] Fixup typedoc warnings (#6540) 2025-09-10 13:35:55 -05:00
overrides.ts Revert "[Refactor] Add TIME_OF_DAY_OVERRIDE & refactor arena tint code" 2025-09-27 14:55:59 -07:00
phase-manager.ts [Misc/Feature] Add dynamic turn order (#6036) 2025-09-20 17:49:40 -05:00
phase-tree.ts [Docs] Fix/update some comments and spacing 2025-09-21 00:22:53 -07:00
phase.ts [Test] Removed deprecated functions from phase interceptor (#6195) 2025-08-19 19:54:40 -05:00
polyfills.ts [Dev] Add support for manually rolling polyfills. Add polyfill for promise.withResolvers (#6103) 2025-07-19 09:06:32 -07:00
scene-base.ts [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
starting-wave.ts [Dev] Enable Biome import sorting (#6052) 2025-07-13 00:21:25 -07:00
timed-event-manager.ts [Misc][Refactor] Add scaffolding for TypedArrays and improve typing on methods related to arrays (#6547) 2025-10-06 12:21:58 -05:00
touch-controls.ts [Bug] Make touch events prevent pointer events (#6528) 2025-09-10 13:59:21 -05:00
tutorial.ts [Misc] Simplifying imports of UI files (#6542) 2025-09-11 00:30:17 -07:00
ui-inputs.ts [Misc] Simplifying imports of UI files (#6542) 2025-09-11 00:30:17 -07:00
vite.env.d.ts [Tests][Bug][Beta] Fix ditto bug and add unit tests (#6559) 2025-09-15 23:26:57 -05:00