Replies: 1 comment
-
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
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