<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Generics on Dev &amp; Platform Engineering Hub</title><link>https://rhidayat.work/topics/generics/</link><description>Recent content in Generics 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/generics/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 2: Intermediate TypeScript — Generics, Type Helpers, and Mapped Types</title><link>https://rhidayat.work/series/typescript/intermediate/02-type-transformations-and-generics/</link><pubDate>Sun, 09 Aug 2026 13:00:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/intermediate/02-type-transformations-and-generics/</guid><description>An in-depth guide to intermediate TypeScript type transformations. Master generic functions and constraints (extends), indexed access types, keyof/typeof operators, built-in helpers (Pick, Omit, Record, ReturnType), and mapped type transformations.</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><item><title>TS Ep 38: Mapped Types (Basics)</title><link>https://rhidayat.work/series/typescript/intermediate/14-mapped-types-basics/</link><pubDate>Sun, 09 Aug 2026 12:20:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/intermediate/14-mapped-types-basics/</guid><description>An in-depth guide to Mapped Types in TypeScript. Learn how to use the &lt;code&gt;[K in Union]&lt;/code&gt; syntax to iterate over literal unions, transform existing object properties using &lt;code&gt;keyof&lt;/code&gt; and Indexed Access, and build strict state validation maps that perfectly mirror domain models.</description></item><item><title>TS Ep 32: Multiple &amp; Dependent Generic Parameters</title><link>https://rhidayat.work/series/typescript/intermediate/08-multiple-generic-parameters/</link><pubDate>Sun, 09 Aug 2026 11:50:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/intermediate/08-multiple-generic-parameters/</guid><description>An in-depth guide to using multiple generic parameters in TypeScript. Learn dependent type parameter relationships, object merging signatures, and how to solve the Partial Generic Inference Trap using higher-order curried functions.</description></item><item><title>TS Ep 31: Default Generic Arguments (`&lt;T = Default&gt;`)</title><link>https://rhidayat.work/series/typescript/intermediate/07-default-generic-arguments/</link><pubDate>Sun, 09 Aug 2026 11:45:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/intermediate/07-default-generic-arguments/</guid><description>An in-depth guide to Default Generic Arguments in TypeScript. Learn how assigning fallback types (&lt;code&gt;&amp;lt;T = Default&amp;gt;&lt;/code&gt;) simplifies generic interfaces, combining constraints with defaults (&lt;code&gt;&amp;lt;T extends Constraint = Default&amp;gt;&lt;/code&gt;), and enforcing strict parameter ordering rules.</description></item><item><title>TS Ep 30: Generic Constraints (`extends` Keyword)</title><link>https://rhidayat.work/series/typescript/intermediate/06-generic-constraints-extends/</link><pubDate>Sun, 09 Aug 2026 11:40:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/intermediate/06-generic-constraints-extends/</guid><description>An in-depth guide to Generic Constraints in TypeScript. Learn why unconstrained &lt;code&gt;&amp;lt;T&amp;gt;&lt;/code&gt; limits property access, how &lt;code&gt;&amp;lt;T extends Shape&amp;gt;&lt;/code&gt; establishes lower type bounds, why generic constraints outperform interface parameter types, and how to constrain keys using &lt;code&gt;&amp;lt;K extends keyof T&amp;gt;&lt;/code&gt;.</description></item><item><title>TS Ep 29: Introduction to Generics — Type Parameters (&lt;T&gt;)</title><link>https://rhidayat.work/series/typescript/intermediate/05-intro-to-generics/</link><pubDate>Sun, 09 Aug 2026 11:35:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/intermediate/05-intro-to-generics/</guid><description>An in-depth introduction to Generics in TypeScript. Learn how type parameters (&lt;code&gt;&amp;lt;T&amp;gt;&lt;/code&gt;) bridge reusable logic with strict type safety, generic type inference, generic interfaces (&lt;code&gt;ApiResponse&amp;lt;T&amp;gt;&lt;/code&gt;), and generic classes.</description></item><item><title>TS Ep 27: The `keyof` Type Operator</title><link>https://rhidayat.work/series/typescript/intermediate/03-keyof-operator/</link><pubDate>Sun, 09 Aug 2026 11:25:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/intermediate/03-keyof-operator/</guid><description>An exhaustive guide to the &lt;code&gt;keyof&lt;/code&gt; operator in TypeScript. Learn how &lt;code&gt;keyof&lt;/code&gt; extracts property key unions from object interfaces, array/tuple types, index signatures, and how to combine &lt;code&gt;keyof&lt;/code&gt; with Generics to build type-safe property accessors.</description></item><item><title>TS Ep 26: Indexed Access Types (`T[K]`)</title><link>https://rhidayat.work/series/typescript/intermediate/02-indexed-access-types/</link><pubDate>Sun, 09 Aug 2026 11:20:00 +0000</pubDate><guid>https://rhidayat.work/series/typescript/intermediate/02-indexed-access-types/</guid><description>An in-depth guide to Indexed Access Types (&lt;code&gt;T[K]&lt;/code&gt;). Learn how to look up specific property types from object shapes, perform nested indexing, index with unions &lt;code&gt;T['a' | 'b']&lt;/code&gt;, extract array element types using &lt;code&gt;[number]&lt;/code&gt;, and enforce DRY type architectures.</description></item><item><title>Go Ep 13: Generics (Type Parameters)</title><link>https://rhidayat.work/series/go/13-generics-in-go/</link><pubDate>Sun, 09 Aug 2026 10:00:00 +0000</pubDate><guid>https://rhidayat.work/series/go/13-generics-in-go/</guid><description>&lt;div class="lead text-neutral-500 dark:text-neutral-400 !mb-9 text-xl"&gt;
 Before Go 1.18, writing a reusable function for finding a slice element required duplicate functions for &lt;code&gt;int&lt;/code&gt;, &lt;code&gt;string&lt;/code&gt;, and &lt;code&gt;float64&lt;/code&gt;, or using reflection. &lt;strong&gt;Generics&lt;/strong&gt; solve this using Type Parameters.
&lt;/div&gt;</description></item></channel></rss>