正在加载视频...

视频加载失败

Library types can run, but they can't hide

25,993 次观看 • 1 年前 •via X (Twitter)

10 条评论

Zack Jackson 的头像
Zack Jackson1 年前

This is really cool and also will give me more TS nightmares

the enigma 的头像
the enigma1 年前

you don't learn this by vibe coding

📦🛠👷🏻‍♂️Sean Larkin 的头像
📦🛠👷🏻‍♂️Sean Larkin1 年前

LIBRARY 👏 AUTHORS 👏 PLEASE 👏 USE 👏 API-EXTRACTOR 👏

aditya 的头像
aditya1 年前

my typescript don’t typescript like that sadly

Brandon McConnell 的头像
Brandon McConnell1 年前

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.

Matt Pocock 的头像
Matt Pocock1 年前

Yep

Garrett 的头像
Garrett1 年前

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

Matt Pocock 的头像
Matt Pocock1 年前

Ahhhh good one

Ian Summerlin 的头像
Ian Summerlin1 年前

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

Dominic Idagu 的头像
Dominic Idagu1 年前

Ohlalala.. never saw that coming

相关视频