Library types can run, but they can't hide
@mattpocockuk334.750 Follower
26.011 Aufrufe
10 Kommentare
Kommentare aus dem Originalbeitrag auf X (Twitter)

@ScriptedAlchemy
This is really cool and also will give me more TS nightmares
7 Likes

@DisturbedCoin
you don't learn this by vibe coding
5 Likes

@TheLarkInn
LIBRARY 👏 AUTHORS 👏 PLEASE 👏 USE 👏 API-EXTRACTOR 👏
5 Likes

@adiaddxyz
my typescript don’t typescript like that sadly
3 Likes

@branmcconnell
I’ve ran into the same problem so many times, I couldn’t possibly count them. I’ve even patched packages locally simply to export something that wasn’t exported, which was harder to infer. For the `{ type: "source" }` you’re using here, is that just any bit of part of the desired type, and then it filters by types that match that? Mastering this technique would be a massive time saver.
3 Likes

@mattpocockuk
Yep
5 Likes

@PolymathicEng
Now try to extract the available model name literals from the providers (OpenAI, google, etc) One of the most frustrating things about using that sdk
3 Likes

@mattpocockuk
Ahhhh good one
2 Likes

@iansummerlinio
I’ve been using Exclude<type, undefined> Didn’t know about NonNullable 💀💀
2 Likes

@domthegeek
Ohlalala.. never saw that coming
1 Like