Daniel Pritchett

Daniel Pritchett

@dpritchett.net

Florida. Programmer. Author. https://dpritchett.net

78 followers158 following150 posts

The better I get at writing Typescript the more I worry this codebase will be entirely inaccessible to other programmers. Is there some other path to eloquent static typing that avoids becoming dense and mysterious to outsiders?

View full thread

Things feel *extra* icky when I gather up a bunch of cute little subtypes: 3️⃣ These are the two dozen webhook event schemas I care about here out of GitHub’s complete list 2️⃣ I’m using Pick<> to only include the fields we use 1️⃣ Oh and I’m mapping that to a list of event names as strings

The better I get at writing Typescript the more I worry this codebase will be entirely inaccessible to other programmers. Is there some other path to eloquent static typing that avoids becoming dense and mysterious to outsiders?

Friday I wrote something like InstanceType<typeof Gitlab> to inject a preconfigured gitbeaker API client. It worked but felt icky. Would a bit of syntactic sugar help, like maybe Instance<&:Gitlab>? Is the exported gitbeaker constructor violating some idioms that make it more awkward than usual?

It really burns having to watch the internet grow rightfully skeptical of posters with conspicuous layout and formatting choices, viewing them as a sign of AI-generated slop. That *used* to be the domain of thoughtful technical writers and ransom notes.

You are up to date.