XState v5 TypeScript improvements #2323
Replies: 6 comments 19 replies
-
txstate feature list (incomplete)Here's txstate's vision (Yes, I'm showing off stuff too :P) It's an incomplete list I'll keep editing it. Legend
|
Beta Was this translation helpful? Give feedback.
-
Better
|
Beta Was this translation helpful? Give feedback.
-
Critic: Why it should have been
|
Beta Was this translation helpful? Give feedback.
-
I think it's worth maintaining a list of issues that users actually came across that can be solved by txstate, so we'd know how of much of real world impact we're going to have. I think it'd be a good metric. I'm not labelling them just a bunch of links. Feel free to mention me in a problem to know if txstate can solve it so we can add it to this list.
|
Beta Was this translation helpful? Give feedback.
-
@devanshj Have you seen the new const userModel = createModel({
name: 'David'
});
const userMachine = userModel.createMachine({
// no need to specify initial `context`!
entry: (context, event) => {
// context and event are fully typed from model
}
}); This might help with type inference since in that |
Beta Was this translation helpful? Give feedback.
-
idk if this is up to date, but if so, I think the other point to add would be to know what's the context is inside actions/services (typestates but everywhere) |
Beta Was this translation helpful? Give feedback.
-
Let's discuss potential upcoming TypeScript improvements to XState v5 and how we might be able to implement them (cc. @devanshj):
.schema
.initial
property should autocomplete key from.states
.initial
property is not key from.states
.type: 'compound'
(implicit or explicit) should not have a.states
propertyonDone
should have its.data
strongly typed for invoked promisesBeta Was this translation helpful? Give feedback.
All reactions