-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added interop observable symbols to ActorRef #2835
Added interop observable symbols to ActorRef #2835
Conversation
Signed-off-by: Wouter Termont <woutermont@gmail.com>
🦋 Changeset detectedLatest commit: 444553c The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
CodeSee Review Map:Review in an interactive map View more CodeSee Maps Legend |
Co-authored-by: David Khourshid <davidkpiano@gmail.com>
Signed-off-by: Wouter Termont <woutermont@gmail.com>
…b.com/woutermont/xstate into feature/interop-actorref-subscribable
Signed-off-by: Wouter Termont <woutermont@gmail.com>
Making |
@Andarist LGTY? |
// this gets stripped by Babel to avoid having "undefined" property in environments without this non-standard Symbol | ||
// it has to be here to be included in the generated .d.ts |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
have you confirmed that this works? is the Symbol.observable
emitted in the .d.ts
? is this property in the dist files from here by Babel?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, only [symbolObservable]
is used in the ES file, and [Symbol.observable]
is present in the type declarations.
toSCXMLEvent, | ||
toEventObject, | ||
toObserver, | ||
interopSymbols |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There might be compatibility issues between mismatched versions of xstate
and @xstate/inspect
- I would just touch the core directory as part of this PR and revert the changes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would you suggest to do this? InspectReceiver
of @xstate/inspect
is an alias for an ActorRef
, which is impacted by these changes in the core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can revise these in a follow-up PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great if we could add some tests for this.
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Signed-off-by: Wouter Termont <woutermont@gmail.com>
…b.com/woutermont/xstate into feature/interop-actorref-subscribable
That would indeed be great, but the only thing this PR does is adding an interface, and making an existing interface extend from it (with some sugar to implement it) ... where/how should I test this? |
@Andarist, can you confirm my changes and comments are satisfactory, or reply once more to them? |
@woutermont are you using this feature? I'm wondering how you are using this at runtime because I have a suspicion that this might not work correctly for all the cases. So I wonder - for which exact cases is this working for you (I can think of one). EDIT:// actually, after further analysis I think that it's somewhat the other way around. I've found a single place for which this wasn't working quite OK. |
We're using this to combine XState ActorRefs (specifically the Interpreter, I believe) with RxLitElement. I'm currently on holiday, but can provide more info when back. |
Closes #2834