Closed thegedge closed 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.
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 anIAnyType
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 intsconfig.json
has also been updated to ensure typechecking in__tests__
happens, and I've added atypecheck
command topackage.json
to be able to run just a typecheck on the codebase. I iterated on those until everything passed.