-
Notifications
You must be signed in to change notification settings - Fork 47
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
Porting txstate #56
Porting txstate #56
Conversation
Hey @devanshj - I just wanted to say that this is awesome! I'm on crunch time at work so I didn't have time to review It yet, but I'm super excited to merge! |
Thanks I'm glad you liked it! I didn't even expect you to want to merge it haha. And no worries at all take your time, I understand. |
Ok, I started reading the code. I will probably more questions as I go ;)
Some other observations & things to do:
Overall I love how this is going. You put a lot of effort into this, so I'd like to invite you to be a maintainer of this project with me. Is this something that interests you? |
Not really,
That's right
Sure
Ah must have missed, thanks.
Haha still has a lot of useless stuff like
Haha thanks, idr if it was original or inspired xD
Yep that'd be good.
Sure thing, I'd prefer to work on a release article. I was thinking of hosting it somewhere (as opposed to md) so we can have twoslash intergration (as opposed to screenshots) but then I think that'd be too much of work :P wdyt?
I understand where you're coming from but it's not something that I'd opt into majorly because this is something I do for fun quite literally and maintaining a library is no fun xD Look I understand that contribution comes with an implicit responsibility which I'll gladly fulfil (eg helping you out if users report some ts issues etc) but "maintainer" is a overhead responsibility for me especially given the area this library focuses is not really of my interest, I've never written a state machine nor have I even used xstate, it just happened to be a typing challenge that I took. So thanks for the offer but I don't think I'll be able to take it sorry! |
Other things pending here -
|
Don't worry, I understand.
I think you should absolutely do it. Is there any public platform that supports twoslash (like dev.to)? |
Thanks for understanding!
I doubt. We can use gh-pages I guess. I could use remark-shiki-twoslash or something like that to output html. |
Question: Prettier is screaming at me when I open the files. I see that you like to be precise about the formatting - can you live with some configuration of Prettier? We can disable it too, but I would prefer to keep it. |
Good observation :P I was about to mention about prettier, I tell you what -- I absolutely hate it. I could write an essay on how it's just wrong. But hey it's your project if you prefer to keep it do that. Though I doubt it'd matter as it's not like a big org where people would have diff opinion about formatting and would bike-shed all the time (that's the only place I can give prettier a benefit of doubt). Though again I'd have you take the call. Oh wait yeah I would still want prettier to ignore |
Did you rebase to the latest |
🤣😆
Deal - I'll keep ignoring |
Hey @devanshj - Do you think this is in a state we could release another beta before the official 1.0 release? It could be nice to have some additional user testing. |
Found a bug while converting the timer example. Filled separately for better organization: #62 |
Sure thing but not yet, I'll mark this a draft for clarity and will open once it's ready or at least ready enough for a beta. Right now enforcing |
// match output dir to input dir. e.g. dist/index instead of dist/src/index | ||
"rootDir": "./src", | ||
// stricter type-checking for stronger correctness. Recommended by TS | ||
// "rootDir": "./src", |
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.
(from txstate-port) I think removing "rootDir": "./src"
will affect the build (?), but I want to type-check "tests" folder too. How to go about this?
@cassiozen I think this is good for another beta. |
Awesome. I created a new branch We can continue working on this same PR on your fork, or open a new PR, whatever you prefer. |
This reverts commit e0fb47e.
@all-contributors please add @devanshj for bug, code, ideas and test |
I've put up a pull request to add @devanshj! 🎉 |
The only thing pending other than documentation is lite-types, I think I'll open a new PR for that and base it on the beta branch. You can add commits changing documentation on the beta branch directly if you want. |
* Porting txstate (#56) feat: better types via txstate port * docs: add devanshj as a contributor for bug, code, ideas, test (#63) * docs: update README.md [skip ci] * docs: update .all-contributorsrc [skip ci] Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com> * Contributors * fix(nextEvents): only normalise don't widen (#64) * Update README.md Co-authored-by: Devansh Jethmalani <[email protected]> Co-authored-by: allcontributors[bot] <46447321+allcontributors[bot]@users.noreply.github.com>
Supercedes #36
I was trying to write some types for implementation for you so I even rewrote the whole thing because I felt like and I was bored ahaha. Take no pressure in merging this but if you like it do it and you can also use the types from here.
There's some really good stuff in here that is branded types and assertNever for exhaustive check and strongly typed record which I don't have time to explain because I'm going to sleep :P but the gist is as all primitive are branded you can't make mistakes like these...
Haven't checked if the tests are passing or not btw didn't have time was in a rush. Coz really I just rewrote this for fun don't mind me xD (this branch is based on
txstate-port
btw, if you want to quickly check the diff you can do it here). And if it interests you feel free to ask questions.And also if you like those
Impl
types let me know if you want me to add them totxstate-port
branch itself.To-do:
t
lite-typed
versionnextEvents.includes
inferred asnever
(nextEvents.includes
inferred tonever
#62)