Open FranzFlueckiger opened 3 years ago
Good point 👍 Keep thinking I'm just going to re-write this in TS. I think you need to make it optional, right? So not all TS users need to provide a type?
Like...
type SomeType<T = void> = OtherType<T>;
Hi Steve, sorry for the late response. You're right that the generic should be optional so that this change is non-breaking for the users.
This PR allows typescript users to directly have the type of the incoming data array inferred in all the following functions: keyAccessor, start, enter, update and leave. If this PR is accepted, nothing will change from the user's perspective except that they will enjoy code completion where they might expect it to be.