That's fine, you just need to watch out if a little old lady invites you inside whilst you're nibbling on the house.
That's fine, you just need to watch out if a little old lady invites you inside whilst you're nibbling on the house.
Hot patch or did you need to restart?
Easy to forget language features you don't use every day. I don't use "infer" enough and the real version of this I implemented this week also needs a type cast on the Object.fromEntries as we don't have 5.5 yet ๐
Updated example of a TypeScript function turning the properties from objects in an input array into keys of the return object.
You're right, that works and is a big improvement, thanks!
How do you bowl a pizza? Is that like bowling for soup?
I don't think that's valid syntax but maybe I'm missing something..
Some Typescript code showing how to create a function which returns an Object type which is strongly typed based on one of the properties in the input array.
This week I found myself needing to come up with a function returning an object which would be strongly typed based on a property from the objects from the input array.
This is what I ended up with, the only gotcha is needing 'as const' on the the input array. #TypeScript
That had better be extra virgin JavaScript or I'm not touching it
As a frontend platform engineer, my users are other engineers!
Which means I miss your grandma even more than you do.
In what must surely be the world's greatest use of AI this week, I have created a Slack response template which successfully masks my sarcasm and derision.
If I had a dollar for every time someone in my company asked me why we're not "just using GRPC" on the frontend...
Let's just say I'd have enough money to buy the company, and still have enough left over to get the professional help I need.
It's 8am, the kids have got to get ready for school and I'm crying at Bluey again
Adding one to max safe integer in the JavaScript console
Checkmate, JavaScript