Closed thegedge closed 2 months ago
cc @coolsoftwaretyler
Phenomenal! You are really on a roll. Thanks for all the help. Will review and probably merge/ship this weekend or early in the week.
@thegedge - looks great to me! I rebased to fix up some of the conflicts from https://github.com/mobxjs/mobx-state-tree/pull/2189. Will merge this in and release as a patch as well.
What does this PR do and why?
Fixes #2184
Our narrowing functions, like
isLateType
, weren't properly narrowing things to the expected type. This PR fixes that by writing them like the typical narrowing function in TS:Steps to validate locally
Given this is just a change to types, one can run the
bun typecheck
andbun test __tests__/core/type-system.test.ts
(where I've added a new test).