Mateusz Burzyński Profile Banner
Mateusz Burzyński Profile
Mateusz Burzyński

@AndaristRake

Followers
6,553
Following
390
Media
660
Statuses
12,656

programmer but also a little bit of code-poet wannabe, maintaining XState, Emotion, redux-saga & more, OSS enthusiast

Wroclaw, Poland
Joined June 2014
Don't wanna be here? Send us removal request.
Explore trending content on Musk Viewer
@AndaristRake
Mateusz Burzyński
2 years
I've spotted a new label in the TypeScript repo and I dig it 🤣
Tweet media one
11
100
962
@AndaristRake
Mateusz Burzyński
2 years
A code snippet like this saved me already *multiple times* when investigating why the focus shifts somewhere unexpectadly
Tweet media one
10
39
575
@AndaristRake
Mateusz Burzyński
3 years
OMG, you only tell me now about this?! { "jest": { "snapshotFormat": { "printBasicPrototype": false } } }
10
31
297
@AndaristRake
Mateusz Burzyński
2 years
This is not a drill! Improvements to the *in operator* might be coming in TS 4.9 🔥🔥🔥
Tweet media one
14
31
290
@AndaristRake
Mateusz Burzyński
2 years
One dev "super power" that I have is debugging... how do I teach this to others?
49
6
249
@AndaristRake
Mateusz Burzyński
8 months
Reverse mapped types are just so super elegant for certain use cases... Here we have an equivalent of `Promise.allSettled` that retains positional information for each item in the input
Tweet media one
8
14
239
@AndaristRake
Mateusz Burzyński
2 years
TIL: the second variant is more verbose but should be preferred because it's homomorphic (preserves property modifiers):
Tweet media one
5
30
227
@AndaristRake
Mateusz Burzyński
6 years
Just published a new experimental @babeljs plugin which makes it easier to write render props (no nesting!) based on @trueadm idea , cc @threepointone @IAmTrySound @reactjs
Tweet media one
Tweet media two
9
45
222
@AndaristRake
Mateusz Burzyński
2 years
This might be the weirdest fix I've added to a codebase after hours of debugging...
Tweet media one
18
1
211
@AndaristRake
Mateusz Burzyński
2 years
TypeScript 5.0 Beta is going to be published today! Can't wait for playing more with it
6
11
210
@AndaristRake
Mateusz Burzyński
2 years
const modifiers for type parameters are coming to TS 5.0, I had a feeling that this might happen soon loving, loving it ❤️ declare function bar<const T>(obj: T): T; bar([1, 'foo']) // readonly [1, 'foo'], and not (string | number)[]
7
30
205
@AndaristRake
Mateusz Burzyński
2 years
aaaand `const` modifiers on type parameters landed in TS 🚀
6
10
194
@AndaristRake
Mateusz Burzyński
2 years
Still need to read through the whole thing but this looks quite exciting for dealing with a class of stale closure problems
5
19
190
@AndaristRake
Mateusz Burzyński
2 years
Tweet media one
12
10
193
@AndaristRake
Mateusz Burzyński
2 years
Who said that OSS work doesn't pay bills? Jokes on you!
Tweet media one
8
4
172
@AndaristRake
Mateusz Burzyński
3 years
Tree-shaking deoptimizations demystified 🧙‍♂️ and some tips on how to make your libs more treeshakeable, by my humble self 😉
4
45
165
@AndaristRake
Mateusz Burzyński
6 years
redux saga v1 is finally out! just slight evolution, fixing past mistakes etc, certainly not the revolution. I hope your migration will go smoothly 🚀
10
58
162
@AndaristRake
Mateusz Burzyński
2 years
Yet another reason to avoid `instanceof` as much as possible.
Tweet media one
20
12
157
@AndaristRake
Mateusz Burzyński
2 years
Just opened a new PR to TypeScript - one that would allow people to opt into "partial inference". The current problem is that once you supply any type argument - the rest can't be inferred (defaults are used). I'm trying to change that. Feedback welcome
10
13
157
@AndaristRake
Mateusz Burzyński
9 months
to overload functions or to not overload them in TS? overloading is often easier but you might lose some control, especially when it comes to completions you can often do better with "dynamic rest" technique
Tweet media one
10
5
153
@AndaristRake
Mateusz Burzyński
1 year
My 100th commit has just been merged to @typescript It’s a wild run, learned a shitload in the process and yet I still barely scratched the surface. For more to come 🍻!
6
5
148
@AndaristRake
Mateusz Burzyński
4 years
@erikras given your description, I was literally expecting him to fall into the water - I'm confused now...
6
1
135
@AndaristRake
Mateusz Burzyński
3 years
Instantiation expressions are coming to TypeScript. It will, sort of, become possible to have the deferred application of type arguments. Wonky experiment to experiment with the syntax below and link to the TS PR too:
Tweet media one
11
9
135
@AndaristRake
Mateusz Burzyński
2 years
Over 10% of the currently open PRs to TypeScript are mine... I should get a Hoarder achievement badge from GitHub or something
5
1
131
@AndaristRake
Mateusz Burzyński
1 year
Not exactly the hottest feature but if you ever wanted to narrow types in TS using `switch (true)` then TS 5.3 will finally support this :)
6
15
129
@AndaristRake
Mateusz Burzyński
2 years
Nobody can say that my code reviews are not thorough 😅
Tweet media one
6
0
114
@AndaristRake
Mateusz Burzyński
1 year
@alistaiir Dont put types condition first when u are using type:module at the top of ur package.json. It’s a mistake and TS wont resolve it it correctly from CJS-targeting files (authored in ESM) when using moduleResolution:node16
11
8
115
@AndaristRake
Mateusz Burzyński
2 years
Reverse mapped types are extremely powerful in TypeScript - but very little known. Example: inferring per tuple element types based on one of the element’s properties:
1
5
114
@AndaristRake
Mateusz Burzyński
4 years
👩‍🎤 Emotion 11 is out! On 11/11 (at least in some parts of the world 😉). A year of tackling issues and helping the community - it wouldn't happen if not for the help of external contributors & the keen eye and the support of @mitchellhamiltn 🚀
7
26
110
@AndaristRake
Mateusz Burzyński
7 years
So I've written best practices for JS package publishing (more coming soon!) using @RollupJS & @babeljs , use them to make your libraries smaller 🚀
1
39
109
@AndaristRake
Mateusz Burzyński
5 months
@mattpocockuk Macbook Pro 16"
5
0
106
@AndaristRake
Mateusz Burzyński
2 years
Isn't TypeScript just beautiful? 😜 Instantiations expressions are just awesome and probably way underutilized and little known! They require TS 4.7 though
Tweet media one
21
8
99
@AndaristRake
Mateusz Burzyński
2 years
Understanding the foundations of the type system comes in pretty handy. Sometimes it helps write faster types 🏎 You can play around with those examples here:
Tweet media one
5
9
100
@AndaristRake
Mateusz Burzyński
11 months
My PR from 2017 to @babeljs has just been merged!
4
1
99
@AndaristRake
Mateusz Burzyński
2 years
Please don't reimplement package resolution algorithms. Use libs - they exist for a reason and they are **battle tested** Those few kbs that you can shave ain't worth the pain caused by the bugs you create by reimplementing this stuff
9
1
98
@AndaristRake
Mateusz Burzyński
10 months
Do you know how long it takes to land 100 commits to @typescript ? 7 months 😅 I'm quite proud of myself for landing my 200th 😉
@AndaristRake
Mateusz Burzyński
1 year
My 100th commit has just been merged to @typescript It’s a wild run, learned a shitload in the process and yet I still barely scratched the surface. For more to come 🍻!
6
5
148
9
1
99
@AndaristRake
Mateusz Burzyński
1 year
1.toString() // syntax error 1..toString() // ok 1. toString() // syntax error 1 .toString() // ok 1/**/.toString() // ok
15
1
98
@AndaristRake
Mateusz Burzyński
3 years
Oh man, i cannot lie, It still feels like a lucky roll of die: Moving from one amazing team To the job from my dream. State machines, readable logic, open source?! That life of mine have not turned out the worst 😉
@statelyai
Stately.ai
3 years
Time to share our current state. We're excited to announce the Stately team that will be working on the mission of making application logic more visual, robust, and accessible. Stay updated and get early access here: 👩‍💻🧑‍💻👇
12
29
186
16
3
95
@AndaristRake
Mateusz Burzyński
4 years
Stylis 4 has shipped - . Its a foundation of most css-in-js libs. A super tiny, fast and crazy as fuck css parser by @thysultan 👏 ive helped with the newest release a little bit but this is all this man’s mind. Blessed for having a chance to work with him
3
13
91
@AndaristRake
Mateusz Burzyński
2 years
nested `describe` blocks in tests are overrated... over time I often see tests added to random blocks because they are just appended~ to a file and nobody bothers finding the "proper" block. It's also hard to catch this during code review just list them all flat...
7
2
87
@AndaristRake
Mateusz Burzyński
3 years
Based on my recent findings - the best way to gain followers is to: 1. Post what has been merges to TS 2. Post about a jest config option 3. Engage with Dan Abramov in some super random thread I think im going to focus on those strategies now
4
0
87
@AndaristRake
Mateusz Burzyński
1 year
Why did this render? - Hook 66 changed
3
1
82
@AndaristRake
Mateusz Burzyński
2 years
I've heard stories about M1 but executing a full TS test suite in under 2 minutes with fans barely being heard... this is ridiculous. My previous Mac took over 15 minutes to run through this and I could barely use it for other stuff in the meantime 😱 😱 😱
11
3
83
@AndaristRake
Mateusz Burzyński
2 years
After more than 3 years - my old PR to React was kinda merged, making different types of memo components reusing old props more consistently during bailouts. Don't let your dreams die, just wait patiently 🤣
3
2
79
@AndaristRake
Mateusz Burzyński
2 years
I just had to pull over and recheck one extra thing in the TS playground that I had open cause I got a new idea while driving. I’m sick. Send help
9
2
78
@AndaristRake
Mateusz Burzyński
2 months
Thank you JavaScript
Tweet media one
3
0
79
@AndaristRake
Mateusz Burzyński
1 year
Just opened a new TypeScript feature request... this time for "named type parameters", this is what @tannerlinsley often refers to as generic bags declare function fn<{ a extends number, b }>(arg1: a, arg2: b): void fn<{ a: 100, b: 'foo' }>(100, 'foo')
7
7
76
@AndaristRake
Mateusz Burzyński
1 year
@matthewcp try { var foo = doStuff() } catch (err) { throw err } // use `foo` here
6
1
76
@AndaristRake
Mateusz Burzyński
2 years
How to start debugging an infinite loop? Just pause "at random" in devtools while looping and inspect the call stack. It might give you a lot of insight into what is happening. You don't need a breakpoint to pause!
Tweet media one
6
6
75
@AndaristRake
Mateusz Burzyński
1 year
Just opened a new feature request for TypeScript - a new `preferinfer` type parameter modifier: declare function get<T, preferinfer K extends keyof T>(obj: T, key: K): T[K] get<User>({ name: 'Andarist', age: 32 }, 'name') // string
10
8
73
@AndaristRake
Mateusz Burzyński
4 years
0
0
71
@AndaristRake
Mateusz Burzyński
1 year
TIL that `typeof v === 'function'` and `isFunction(v)` behave differently in TS
Tweet media one
6
5
71
@AndaristRake
Mateusz Burzyński
10 months
Tweet media one
6
2
71
@AndaristRake
Mateusz Burzyński
1 year
I poured (and continue pouring) so many hours of my thoughts into this... Check it out while it's hot 🌡!
@DavidKPiano
David K 🎹
1 year
After many years & lots of feedback, we're finally announcing XState v5 beta 🚀 npm i xstate @beta • Powerful new statechart features ⚡️ • Actor logic for anything, not just state machines 🎭 • Reduced API surface area 🗜 • New docs 📚 • So many fixes & improvements ✨
Tweet media one
26
111
654
3
2
69
@AndaristRake
Mateusz Burzyński
1 year
Tasty
1
12
68
@AndaristRake
Mateusz Burzyński
1 year
this is truly the darkest TypeScript magic I've seen
@arktypeio
ArkType
1 year
What if instead of hitting instantiation limits on cyclic types, your validator could pass them to optimized, type-safe generics? Everything you've been told about the limitations of TypeScript is a lie- you just have to be willing to think a bit of outside the box0️⃣1️⃣📦
Tweet media one
4
11
85
3
1
67
@AndaristRake
Mateusz Burzyński
10 months
I'm such a good contributor that @vercel lists me twice 🤣
@rauchg
Guillermo Rauch
10 months
Compiling the list of contributors for a @nextjs release never gets old. What an incredible community 🥲
Tweet media one
16
11
369
5
0
66
@AndaristRake
Mateusz Burzyński
4 years
Modern JS lib maintainer mantra: “please provide @codesandbox with the issue reproduced... please provide @codesandbox with the issue reproduced...”. Honestly cant imagine living without @codesandbox , the past without it feels grim nowadays
3
3
63
@AndaristRake
Mateusz Burzyński
2 years
Tweet media one
3
5
63
@AndaristRake
Mateusz Burzyński
2 years
@_philpl Dont worry, it always feels weird at first, you will get used to it though…
1
0
60
@AndaristRake
Mateusz Burzyński
2 years
React landed its `experimental_useEvent` hook a few days ago. There are also tests there that show that the very same behavior can't be implemented in the user-land - those callbacks get updated ASAP, before any other effect types
3
8
57
@AndaristRake
Mateusz Burzyński
2 years
And the saga continues...
Tweet media one
10
1
59
@AndaristRake
Mateusz Burzyński
1 year
This is a valid JavaScript: class N extends null {} You can't construct an instance of this class but you can declare this class 😅
13
3
58
@AndaristRake
Mateusz Burzyński
2 years
Just refrained myself from posting a snarky response to a demanding OSS user. Is there now anything I can’t do? 😮
10
0
58
@AndaristRake
Mateusz Burzyński
3 years
Current status: time-travel debugging @typescript 's node run in a browser. @replayio is a hero tool I don't deserve. My dev life consists of 2 major eras now - I call them pre-Replay and post-Replay
6
8
58
@AndaristRake
Mateusz Burzyński
2 years
Sometimes it's helpful to name "branches" of your conditional types in TypeScript and use pattern like this. I've seen this in some cool libs like . I've always wondered if TS can smartly only compute the "chosen" branch... 1/2
Tweet media one
3
4
58
@AndaristRake
Mateusz Burzyński
11 months
@DavidKPiano if you are not writing mov al, [count] inc al mov [count], al you are already doing it wrong
3
1
56
@AndaristRake
Mateusz Burzyński
2 years
Did you know that this can be a dangerous operation? const min = (arr: number[]) => Math.min(...arr) If your `arr` is big enough - it will blow up your call stack 😉 It's also not totally a made-up problem, I've patched this issue yesterday in @replayio
8
5
52
@AndaristRake
Mateusz Burzyński
1 year
@mattpocockuk My bet: in the past TS didnt have intrinsic type aliases so the latter couldnt be implemented without such
2
1
54
@AndaristRake
Mateusz Burzyński
2 years
I opened a TypeScript PR with the PoC for extending reverse mapped types inference with the capability to infer *multiple* things per tuple element/object property through (what I call) concrete properties Im pretty pumped about this potential feature 🤩
4
1
53
@AndaristRake
Mateusz Burzyński
2 years
What people will go through to squeeze two lines into one... amazing.
8
0
52
@AndaristRake
Mateusz Burzyński
2 years
Already experimenting with the upcoming `const` modifiers for TS type parameters. Thanks to a tip from @ahejlsberg I have a working spike for *recursive* validation of initial/states/ids in XState:
6
1
53
@AndaristRake
Mateusz Burzyński
3 months
Congratz to everyone who got sponsorship from @Microsoft . I hope it becomes a norm. It’s a noce gesture - that’s for sure. “One time” sponsorships are worrying though, that doesn’t really give hopes for a sustainable future
7
2
53
@AndaristRake
Mateusz Burzyński
3 years
Couldn't agree more with @turborepo on this one 😉
Tweet media one
2
3
51
@AndaristRake
Mateusz Burzyński
4 years
I can't express this enough but Preconstruct by @mitchellhamiltn ( ) is fucking amazing for building libraries, especially for monorepos. It just amazes me how little spotlight it gets. Go and star it - or even better, use it and spread the love 🧡🎁
4
8
52
@AndaristRake
Mateusz Burzyński
6 months
TS 5.4 (stable) is available on npm already, grab it while it's hot 😉
2
1
53
@AndaristRake
Mateusz Burzyński
5 months
this gonna be a banger in the TS repo 🤣 those who know, know
@me_jd_solanki
JD Solanki ― WrapWithAI ✨
5 months
🎉 New GitHub Feature You can view the PRs that modifies the file you're currently viewing
Tweet media one
4
55
442
1
2
52
@AndaristRake
Mateusz Burzyński
1 year
Switching to modern moduleResolution in TypeScript be like #itsfine
Tweet media one
4
1
49
@AndaristRake
Mateusz Burzyński
2 years
Escape rooms are cool and all, but have you ever tried to merge two long living branches?
6
2
50