Replies: 3 comments 1 reply
-
It was like that to support some old TS versions like 3.8. As of now, v5 dropped some old TS versions, so we might be able to simplify it a bit. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you so much for taking the time to shed some light on this. If the code had comments explaining this caveat, it wouldn't be so confusing. |
Beta Was this translation helpful? Give feedback.
0 replies
-
See this comment and this PR description. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm puzzled by the seemingly redundant
{ length: x | y | z }
checks in theTakeTwo<T>
type definition (which is like a paddedslice(0, 2)
for list types):zustand/src/middleware/devtools.ts
Lines 30 to 48 in 51c00d2
Even the AI assistant can't seem to find a case that slips through the direct checks for a
length
property of 0, 1 or 2 explicitly but then still gets caught by the catch-all.@devanshj, I hate to bother you, but you're likely the best person to answer my question.
Beta Was this translation helpful? Give feedback.
All reactions