setProp action results in massive type definitions in large projects #2547
Closed
sergioisidoro
started this conversation in
General
Replies: 1 comment
-
Discussion to continue over at MST repo: mobxjs/mobx-state-tree#2115 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I've started to hit a typescript limit
After a while of debugging, I finally realised that one of the culprits was
setProp
as it was popping out over and over again in the type definitions. Not that it was a recursive issue (it did stop at some point), but having a somewhat deeply nested tree resulted in setProp type annotations to grow VERY rapidly on some cases.In this case a single
setProp
in the type definitions has almost 600 lines.So I'm leaving this here as a navigation warning / Improvement idea - use
withSetPropAction
seldomly, or make changes to the type annotations of that action.Beta Was this translation helpful? Give feedback.
All reactions