Skip to content
0:00 / 0:00

#typescript#type-buddy#vs-code

No More Unreadable Types! A Cleaner, Functional Way to Build TypeScript Types

Typed Rocks

8.5K subscribers • 1 video on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Linked in the descriptiontyped-rocks/type-buddy
  • Made by the vendor. The company whose product it covers made or sponsored it.

Intermediate. Assumes working knowledge.

7.3K views1 year ago2 recommendations

Programming languagesTools and practiceTypeScriptVim, Emacs and editors

An introduction to Type Buddy, a VS Code extension and web app designed to make complex TypeScript conditional types readable.

Plugin: marketplace.visualstudio.com/items?itemName=chwoerz.type-bud… web app: typed-rocks.github.io/type-buddy/ Github repo: github.com/typed-rocks/type-buddy Until now we always had to use ternaries for complex conditional types. But this gets complex quite fast. That's where Type Buddy steps in. By using this plugin, we can create complex conditional types with ease. Intro The Issue with ternaries Feature 1: Hover Feature 2: Type Buddy Editor Feature 3: Create d.ts files Feature 4: Function Preview : Type Buddy Web App Outro

Why it's here

2 people recommend this

What people say. Recommended as a helpful tool for deconstructing and understanding complex conditional types in TypeScript.

u/dymosin r/typescript • Recommends

On “What practical uses of the ternary have you found?”

As an aside, once you start looking at more complex conditional types, you can use something like Type Buddy to deconstruct it into a nested structure to make it more readable.(The creator also has a YouTube video explaining that in more detail.)

u/Hurinfanin r/typescript • Recommends

Announcement of Type Buddy, a tool for better type read/writeability