I don't understand why people recreate everything for Effect... Like the whole point of Effect being embedded into TypeScript is that you can just use TypeScript libraries...
If there are effects that the library makes then sure wrap them into an Effect type...
🤷🏻♂️
Been building an @EffectTS_ native ORM for a while, and it's finally ready for some of you to try.
- includes ClickHouse + Postgres
- Fully typesafe
- Migrations for both, and it can adopt your existing drizzle-kit migrations
Still early, but it's been running @Mapledotdev in production for about a month.
github.com/MapleTechLabs/eff…
.@DavidKPiano thoughts on using the pattern that sthir uses for types in future xstate versions? Would love if my types reach everyone!
The only barrier is the `_: undefined` thing but I hope @AndaristRake gets to fix it soon as he said in TypeScript#64251
Here are some of the features to recap:
- xitter.cf/devanshj__/status/2094… (minus 4 & 5, these were the advanced features)
- xitter.cf/devanshj__/status/2097… (just have to explicitly type error and requirement once now instead of inference)
So I did this anyway :P
xitter.cf/devanshj__/status/2098…
3. Don't get the crazy advanced features (that other libraries never had in the first place)
Everything else remains the same... Zero compromise on type-safety!
📢📢📢
@sthir/machine (and @sthir/machine/effect) now work with non-forked typescript as well!!!
The difference?
1. You just have to explicitly type things more (but still less than other libraries)
2. You have to write stupid `_: undefined` at times (see typescript#64251)
Thought of adding something cool to Effect...
github.com/Effect-TS/effect/…
>be me
>try to fix xstate
>end up breaking it
github.com/microsoft/TypeScr…
Oh I code golfing with RxJS... 🏌🏻♂️⛳️
1/3rd the size! (and 3 times the sophistication :P)
stackblitz.com/edit/vitejs-v…
Full "copy button" example with effect-machine
📦 Nested states
🪄 @EffectTS_ Clipboard module
⛔️ Error handling state
⏱️ Timer
A simple but rather complete example 👇
Here's a real typescript problem that I've encountered that even I'm having a tough time trying to solve... I wonder if anyone can crack it... tsplay.dev/Nnz0BN
Holy cow I solved it! Admittedly cheated a bit by changing the `Brand` definition but that was permissible as long as it has the same variance and no loss of information
tsplay.dev/WkyQlN
Filed a bug in typescript that I had found years ago but didn't really brought it up (it was buried in another issue)
github.com/microsoft/TypeScr…
Just gave it to sol and it fixed it lmao... if this gets merged I can't believe my first contribution to typescript (after all the crazy unmerged PRs) would be a vibecoded one 😭
github.com/microsoft/TypeScr…
Elm architecture is cool until you try to do something as simple as debouncing... Constraining things to first order FRP is very limiting... It shouldn't take more than a line to create a debounced event...
But it can be easily fixed... You just need to support something that takes a stream of events and gives a stream of events... Elm had a undocumented feature called "effect managers" that could do this... But they killed it
simonh1000.github.io/2017/05…
Maybe I should go back to this graceful degradation idea... But my problem is it doesn't move the needle... It's so boring to have your users type every state-context pair, offer no conflow flow analysis, no effect error & requirement propagation... meh
xitter.cf/devanshj__/status/2096…
Fun fact: I can probably support all the features that @typeonce/effect-machine supports (and more), *with xstate api* and *without changing the compiler*
But that means I'll have to drop all the super cool @sthir/machine/effect features, eg this entry event narrowing...


















