Skip to content

Add better error handling

Latest

Choose a tag to compare

@TenGosc007 TenGosc007 released this 14 Aug 07:56
· 3 commits to main since this release

Release v1.6.0

Add better error handling


Changelog

1.6.0 - 2026-08-14

Added

  • Bounds validation (RangeError) in Board accessors and getLastArrayItem
  • @throws JSDoc on Game constructor, Board accessors, and getLastArrayItem
  • Invariant docs for getWinnerFromFields / GameStrategy.getWinner
  • Tests for all new validation and listener error isolation paths

Fixed

  • savePlayerSelection (deprecated) no longer silently corrupts the board on invalid input — returns PlayerMoveStatus like savePlayerMove
  • Throwing listeners no longer abort subsequent event emissions; errors are re-thrown after all events fire

Changed

  • savePlayerSelection return type: void → PlayerMoveStatus
  • tsconfig.json lib set to ["ES2021"] for AggregateError