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.
200
136
84
3,228
280,008
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,499
175,347
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,556
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
840
98,929
349 days. 19 million steps. Finish line this Sunday🫡
324
2,376
460
49,305
3,903,575
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,750
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,286
107,394
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,031
242,020
Daniel Fry retweeted
Implemented safe triangles to improve submenu selection in @shoelace_style today.
113
512
86
5,476
883,691
as a twitter video
32
110
53
954
117,194
❌ Avoid listening for ref changes with useEffect() in React. ✅ Instead use a ref callback function.
17
136
5
955
101,659
Daniel Fry retweeted
Wes Bos
@wesbos25 Aug 2023
🔥 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,203
558,526
❌ Avoid difficult-to-read conditionals to render elements in react. ✅ Instead use utility components for conditional rendering.
60
224
39
1,625
301,149
Daniel Fry retweeted
🏍 Human pose estimation with Encord's powerful annotation tool
1
1
224