e of pi
e of pi
TTCTheo's Typesafe Cult
Created by Aguilar on 11/10/2024 in #questions
PNPM being weird
Without reading pnpm source code I can’t say definitively, but node 21 is end of life, try downgrading to 20 or upgrading to 22
3 replies
TTCTheo's Typesafe Cult
Created by oz on 9/29/2024 in #questions
Best NextJS Logging Stack?
Any log platform worth anything should let you filter on log level, most should also let you filter on source if you have a different source for environment or by parsing json otherwise. If local means to your console, pino with pino-pretty works well in my experience
14 replies
TTCTheo's Typesafe Cult
Created by Faster!!! on 9/8/2024 in #questions
What kind of IT role is most likely to get you hired first:
If you’re cool with on call think about SRE too
5 replies
TTCTheo's Typesafe Cult
Created by Froxx on 7/24/2024 in #questions
Handling ADHD while programming
IME it’s very easy to overestimate one’s ability to remember things. Note taking is a skill like everything else and will take practice to get good at. Keep in mind one of the things about ADHD is motivation does not work the same way as for neurotypical people. Novelty and deadlines are both effective motivators. So, good job on setting daily goals, definitely keep up with short term goals even on customer projects where those milestones only exist internally
11 replies
TTCTheo's Typesafe Cult
Created by Froxx on 7/24/2024 in #questions
Handling ADHD while programming
Is getting treatment an option? If not, body doubling can be very effective for some (basically just have someone else physically present who knows you’re supposed to be working)
11 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/29/2023 in #questions
ESlint: Require explicit return types on exported functions, yes or no??
I'd rather annotate my function than start throwing as around but at the end of the day it isn't a huge difference
33 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/29/2023 in #questions
ESlint: Require explicit return types on exported functions, yes or no??
Also, you can export meaningful types that would never be inferred
33 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/29/2023 in #questions
ESlint: Require explicit return types on exported functions, yes or no??
Heh, I guess I should say all his free stuff
33 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/29/2023 in #questions
ESlint: Require explicit return types on exported functions, yes or no??
Short answer is it makes things better for the consumers of your code
33 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/29/2023 in #questions
ESlint: Require explicit return types on exported functions, yes or no??
I can give you similar reasoning, I don't really have much to say that Matt doesn't
33 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/29/2023 in #questions
ESlint: Require explicit return types on exported functions, yes or no??
Matt is a top notch typescript resource. I recommend all his stuff.
33 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/29/2023 in #questions
ESlint: Require explicit return types on exported functions, yes or no??
If you want a video, here's an explanation of why to use explicit return types in libraries. https://youtu.be/nwSe95uFN8E?t=152
33 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/29/2023 in #questions
ESlint: Require explicit return types on exported functions, yes or no??
Internal or app code go with inferred returns for sure
33 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/29/2023 in #questions
ESlint: Require explicit return types on exported functions, yes or no??
For libraries you are sharing outside your team
33 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/29/2023 in #questions
ESlint: Require explicit return types on exported functions, yes or no??
They're nice for libraries where you want TS to yell at you if you're going to break your contracts.
33 replies
TTCTheo's Typesafe Cult
Created by currenthandle on 7/29/2023 in #questions
ESlint: Require explicit return types on exported functions, yes or no??
Not if you just jumped in. Best you can reasonably do is ask why it's there. Either you learn something about a specific problem this is solving, or you can start a discussion and maybe others will start to see it your way. (Unless you were specifically brought in to be a typescript expert or something)
33 replies
TTCTheo's Typesafe Cult
Created by Christian Lind on 7/7/2023 in #questions
Weird typescript error
If you want to get questionType for each element in the array, try using map. If you expect to have a single element then something is wrong and nobody can tell without the full code (try a link on typescript playground)
14 replies
TTCTheo's Typesafe Cult
Created by Christian Lind on 7/7/2023 in #questions
Weird typescript error
Looks like you are trying to get the property from an array.
14 replies
KPCKevin Powell - Community
Created by Mastle (AT) on 6/25/2023 in #back-end
What ORM would you recommend for connecting a simple Express.js app to Postgresql?
Maybe something like kysely? It’s a “query builder” rather than a full ORM. Define your database schema as a typescript interface, then get “typesafe” queries that are still close to SQL conceptually.
13 replies