You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
pauldesmondparker
changed the title
Bug: invoke, onDone type incompatability when exactOptionalPropertyTypes: true
Bug: invoke, onDone type incompatibility when exactOptionalPropertyTypes: trueNov 7, 2024
XState version
XState version 5
Description
Reproduction on typescritplang.org.
typescript: v5.6.3
xstate: 5.18.2
Code is the same as the #invoke-and-typescript example with a few tweaks.
Navigate to
TS Config
and setexactOptionalPropertyTypes
.The resulting error on
onDone
will be:Caution
Note
This only happens when I'm trying to use
assign
, otherwise no error.actions
will set it off, but I didn't test that).Expected result
No typescript error.
Actual result
Reproduction
https://www.typescriptlang.org/play/?exactOptionalPropertyTypes=true&ts=5.6.3#code/JYWwDg9gTgLgBAbzgQwM6uAcwHYBo4BmUEIACsSMKgKb40wCuYcAvoRXAOQAeqMyMapwDccOAHpxcGAE8w1VAC44AVgB0ARgAcagEwAoQ8GyCoBZAGNqcAKo0oifWOAATZdgYgARtSjCncNjIINTKfFDGmP4shtTckLBwFhDYfHAglgAWxtYAvHD0TAAUCAGy8kqOYmLJJnEwyghsaFXVYgz2AJJugZ4+fgFtHb4A-Mp2vv5tLLgBMwGWMNCVpW0E1DAWmRNQykQk5CRU1AA8O-hIw1Dd7n2+rAB8RWgy2BZwJXDGYAzwLACUcFyD1abVqaSgCkgqTyKAA7shgPBDpQaGpIagIAAbABu1BKgzaXx631+aiu3VmROqQRCyk4AAkGJgIJwqUSAVMiZDGFBsHAMdCaFyxAD2fMAWoLJCBNQALJZHIEsSSOBqdUBWqCbgNUFwCk9AAsunF7OMSOAyCx9NcWKE7L4spWhNtoT1YhSjUJbWoLiROwAIhtEViVtJkFBMBt6ViIMg-dhMDtOKx2dM06nCbH45Edl7qcYcRAANZu1bUgpQCz09abbb2Nne6qk3WfLX1ViA4EfcsV-VdHrtnXkgf4VUAFTk1mo2AI0CsLmkEDgPgKMAiiabov+GbaKQDKTLW+qi2AKUqaAwOGVfeqV2Un2oeJMnaBIKfM5gaggvx+MDHUgAMrrikmBYjI0hTouLQ7Me267tU8zUkhiGmvonJAA
Additional context
No response
The text was updated successfully, but these errors were encountered: