DEV Community

Marius Bongarts
Marius Bongarts

Posted on

Advanced TypeScript With Code Challenges: Conditional Types

Large elephant with Typescript logo and small elephant with JavaScript logo

Typescript allows you to create so-called conditional types. They take a form that looks similar to conditional expressions (condition ? trueExpression : falseExpression) in JavaScript. That enables us to guarantee types during runtime.

Top comments (1)

Collapse
 
sloan profile image
Sloan the DEV Moderator

Hi there, we encourage authors to share their entire posts here on DEV, rather than mostly pointing to an external link. Doing so helps ensure that readers don’t have to jump around to too many different pages, and it helps focus the conversation right here in the comments section.

If you choose to do so, you also have the option to add a canonical URL directly to your post.