Software engineer in London. TypeScript and AI. VP SWE @jpmorgan @chase_uk

London
Joined February 2022
Daniel Fry retweeted
hey. here's a little demo of the most meaningful improvement to my productivity since speech-to-text.
206
137
85
3,247
285,218
Daniel Fry retweeted
Goal: Calculate a value once per render. Mistake: Declaring a parameterless function. Why? Because then the function may be needlessly called multiple times on every render. Solution: If a function takes no args, declare a variable instead.
18
19
2
367
39,922
Here's my favourite method for getting Go/Zig/Rust-like errors in TS. It's by returning custom errors from functions. - Shows right in the return type - Easy checking with instanceof - No deps required
88
79
29
1,500
175,355
loving this pattern to avoid redundancy in complex class declarations...extract the props from the class prototype and use it as the constructor argument ✅ typesafe ✅ no redundant interfaces ✅ constructor becomes a one-liner
37
83
7
1,250
96,559
Daniel Fry retweeted
TypeScript problem: You need to support any string value, but you’d like autocomplete support for common values. Solution: Create a union with "string & {}" on the end. Now you get autocomplete support for all values listed in the union, but can still enter any value.
19
80
7
839
98,940
349 days. 19 million steps. Finish line this Sunday🫡
324
2,376
460
49,292
3,903,586
TypeScript v5.5 is going to be soooo amazing 🔥 The type-checker will now be able to *infer* type predicates for us 😍 And there's more. Type predicates will ✨compose✨! Huge, huge thanks to @danvdk for landing this PR, I'm so excited about this!
8
39
3
225
12,108
Daniel Fry retweeted
😴 Tired: enabled not doing any type narrowing 🚀 Wired: the brand new skipToken 🔥 Now available in v5.25.0
21
40
4
523
55,705
I wrote a game of TicTacToe using only TypeScript's type system
10
10
203
34,136
Daniel Fry retweeted
We've got you covered
1
8
264
Daniel Fry retweeted
The Mac turns 40 today 🎂 To celebrate, we're giving away Raycast Pro with GPT-4 for one year to 40 people. Simply retweet this tweet and follow @raycastapp to enter. Winners will be announced by the end of the week.
55
930
42
721
285,761
Daniel Fry retweeted
📚 So I finally found the time to write about why we made the breaking parameter changes in v5, and what this new API enables us to do. Prepare to have your mind blown if you don't yet know what the Query Options API can do for you 🤯 tkdodo.eu/blog/the-query-opt…
12
42
2
374
45,433
TypeScript 5.4 will bring a new utility type: NoInfer. This will be EXTREMELY useful for generic functions where you have multiple candidates for inferring a type. In the example below, we use NoInfer to make sure that 'initial' must be one of the states passed.
32
137
11
1,283
107,398
Daniel Fry retweeted
📢Announcing TanStack Query v5 🎉🥳 🤝 unified object API 📈 simplified, optimistic updates ♻️ sharable mutation state 🔀 suspense and streaming w/ RSC ♾️improved infinite queries ⚡️ ~20 % smaller 🛠️new agnostic devtools 💾 fine-grained persistence
59
311
60
2,032
242,020
Daniel Fry retweeted
Implemented safe triangles to improve submenu selection in @shoelace_style today.
113
512
86
5,474
883,694
as a twitter video
32
110
53
951
117,196
❌ Avoid listening for ref changes with useEffect() in React. ✅ Instead use a ref callback function.
17
136
5
955
101,661
Daniel Fry retweeted
🔥 JavaScript Sets are about to become a lot more useful with these 7 new methods: .difference() .intersection() .symmetricDifference() .union() .isSubsetOf() .isSupersetOf() .isDisjointFrom()
81
794
63
5,198
558,532
❌ Avoid difficult-to-read conditionals to render elements in react. ✅ Instead use utility components for conditional rendering.
60
223
39
1,623
301,157
Daniel Fry retweeted
🏍 Human pose estimation with Encord's powerful annotation tool
1
1
224