mobxjs / mobx-state-tree

Full-featured reactive state management without the boilerplate
https://mobx-state-tree.js.org/
MIT License
6.99k stars 641 forks source link

Bump typescript from 3.9.10 to 5.3.3 #2146

Closed thegedge closed 9 months ago

thegedge commented 9 months ago

What does this PR do and why?

Upgrade mobx-state-tree to the latest version of typescript (3.9 -> 5.3).

We were really far behind and missing out on all of the performance improvements and bug fixes, along with features that will allow writing better types for MST (e.g., variadic tuple types for types.union to avoid an IAnyType when 10 or more types unioned).

Steps to validate locally

Leaning on existing tests for build correctness, and other than that I've corrected a few failing typechecks.

The include config in tsconfig.json has also been updated to ensure typechecking in __tests__ happens, and I've added a typecheck command to package.json to be able to run just a typecheck on the codebase. I iterated on those until everything passed.

coolsoftwaretyler commented 9 months ago

Once again, @thegedge - thank you very much for taking this on. It will un-block us on https://github.com/mobxjs/mobx-state-tree/pull/2103, and I hope it will also lead to better typings in general. I'll make sure we stay up to date with TypeScript changes on a more regular cadence from here on out.

I'm going to merge this in. I have a few other PRs I'd like to merge this week alongside it, so I'll ship some pre-releases throughout to make sure the TS changes are all good for our downstream users.