<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Advanced-Types on Dev &amp; Platform Engineering Hub</title><link>https://rhidayat.work/topics/advanced-types/</link><description>Recent content in Advanced-Types on Dev &amp; Platform Engineering Hub</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>© 2026 Rachmat Hidayat</copyright><lastBuildDate>Sun, 09 Aug 2026 13:45:00 +0000</lastBuildDate><atom:link href="https://rhidayat.work/topics/advanced-types/index.xml" rel="self" type="application/rss+xml"/><item><title>TS Ep 55: Advanced Function Composition</title><link>https://rhidayat.work/series/typescript/advanced/15-advanced-function-composition-typing/</link><pubDate>Sun, 09 Aug 2026 13:45:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/advanced/15-advanced-function-composition-typing/</guid><description>How do you type a pipe() function that takes an infinite number of functions, where the output of function A must perfectly match the input of function B? Welcome to the final boss of TypeScript.</description></item><item><title>TS Ep 54: The Builder Pattern with Generics</title><link>https://rhidayat.work/series/typescript/advanced/14-builder-pattern-with-generics/</link><pubDate>Sun, 09 Aug 2026 13:40:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/advanced/14-builder-pattern-with-generics/</guid><description>Learn how to build chainable APIs that accumulate type knowledge at every step. This Generic Accumulator pattern is the secret engine powering libraries like tRPC, Zod, and Prisma, providing unparalleled autocomplete.</description></item><item><title>TS Ep 53: Branding and Flavoring (Nominal Typing)</title><link>https://rhidayat.work/series/typescript/advanced/13-branding-and-flavoring-nominal-typing/</link><pubDate>Sun, 09 Aug 2026 13:35:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/advanced/13-branding-and-flavoring-nominal-typing/</guid><description>TypeScript doesn&amp;rsquo;t care if two types have different names; if they share the same shape, they are equivalent. Learn how to use Branding and Flavoring to force the compiler to differentiate between an OrderID string and a UserID string, powering Domain-Driven Design.</description></item><item><title>TS Ep 52: Variance (Covariance vs Contravariance)</title><link>https://rhidayat.work/series/typescript/advanced/12-variance-covariance-contravariance/</link><pubDate>Sun, 09 Aug 2026 13:30:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/advanced/12-variance-covariance-contravariance/</guid><description>Why is it safe to return a subclass instead of a superclass, but dangerous to accept a superclass parameter instead of a subclass? Welcome to Variance: the computer science underpinning of TypeScript&amp;rsquo;s assignability engine.</description></item><item><title>TS Ep 51: Type-Level State Machines</title><link>https://rhidayat.work/series/typescript/advanced/11-type-level-state-machines/</link><pubDate>Sun, 09 Aug 2026 13:25:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/advanced/11-type-level-state-machines/</guid><description>Use mapped types and generics to enforce finite state transitions in the compiler. A type-level state machine makes impossible states impossible to represent, eliminating entire classes of runtime bugs.</description></item><item><title>TS Ep 50: DeepReadonly and DeepPartial</title><link>https://rhidayat.work/series/typescript/advanced/10-deep-readonly-and-deep-partial/</link><pubDate>Sun, 09 Aug 2026 13:20:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/advanced/10-deep-readonly-and-deep-partial/</guid><description>The built-in &lt;code&gt;Partial&lt;/code&gt; and &lt;code&gt;Readonly&lt;/code&gt; utilities are shallow. Learn how to write your own &lt;code&gt;DeepReadonly&lt;/code&gt; and &lt;code&gt;DeepPartial&lt;/code&gt; utilities that penetrate every layer of nested objects by combining Generics, Conditionals, &lt;code&gt;infer&lt;/code&gt;, Mapped Types, and Recursion simultaneously.</description></item><item><title>TS Ep 48: String Manipulation Utilities</title><link>https://rhidayat.work/series/typescript/advanced/08-string-manipulation-utilities/</link><pubDate>Sun, 09 Aug 2026 13:10:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/advanced/08-string-manipulation-utilities/</guid><description>TypeScript provides four built-in Intrinsic utilities that manipulate the casing of string literal types at compile time. Learn how to pair them with template literals and mapped types to dynamically generate robust event handler mappings.</description></item><item><title>TS Ep 47: Template Literal Types</title><link>https://rhidayat.work/series/typescript/advanced/07-template-literal-types/</link><pubDate>Sun, 09 Aug 2026 13:05:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/advanced/07-template-literal-types/</guid><description>Template literal types allow you to use JavaScript-style template strings (&lt;code&gt;${...}&lt;/code&gt;) inside Type Space. Learn how to generate combinations of string literals automatically via Union Permutation, and parse delimited strings (like emails or URLs) using the &lt;code&gt;infer&lt;/code&gt; keyword.</description></item><item><title>TS Ep 46: Inferring Tuples and Arrays</title><link>https://rhidayat.work/series/typescript/advanced/06-infer-with-tuples-and-arrays/</link><pubDate>Sun, 09 Aug 2026 13:00:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/advanced/06-infer-with-tuples-and-arrays/</guid><description>Pattern matching with &lt;code&gt;infer&lt;/code&gt; isn&amp;rsquo;t just for Promises and Objects. You can deconstruct Tuples and Arrays element by element in Type Space, mirroring the exact syntax of JavaScript&amp;rsquo;s array destructuring and spread operators.</description></item><item><title>TS Ep 45: Inferring Promises (`Awaited`)</title><link>https://rhidayat.work/series/typescript/advanced/05-infer-with-promises-awaited/</link><pubDate>Sun, 09 Aug 2026 12:55:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/advanced/05-infer-with-promises-awaited/</guid><description>Learn how the built-in &lt;code&gt;Awaited&amp;lt;T&amp;gt;&lt;/code&gt; utility models the runtime &lt;code&gt;await&lt;/code&gt; keyword. We explore how to combine the &lt;code&gt;infer&lt;/code&gt; keyword with Recursive Type Aliases to drill down and unwrap Promises infinitely deep, and how to compose it with &lt;code&gt;ReturnType&lt;/code&gt; for async functions.</description></item><item><title>TS Ep 43: Preventing Distribution (Tuples)</title><link>https://rhidayat.work/series/typescript/advanced/03-preventing-distribution/</link><pubDate>Sun, 09 Aug 2026 12:45:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/advanced/03-preventing-distribution/</guid><description>Sometimes, you want a conditional type to evaluate an entire Union as a single monolithic entity, rather than mapping over its individual members. Learn how wrapping generic parameters in brackets &lt;code&gt;[T]&lt;/code&gt; prevents distribution, and how to use this mechanic to build complex &lt;code&gt;IsUnion&lt;/code&gt; checks.</description></item><item><title>TS Ep 41: Conditional Types (The Basics)</title><link>https://rhidayat.work/series/typescript/advanced/01-conditional-types-basics/</link><pubDate>Sun, 09 Aug 2026 12:35:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/advanced/01-conditional-types-basics/</guid><description>Conditional types are the if-else statements of Type Space. Learn how to use the &amp;rsquo;extends ? :&amp;rsquo; syntax to compute dynamic types based on assignability logic, replace complex function overloads, and construct nested else-if type chains.</description></item></channel></rss>