Skip to content

Instantly share code, notes, and snippets.

View juliencrn's full-sized avatar

Julien juliencrn

View GitHub Profile
@juliencrn
juliencrn / types.ts
Created February 2, 2025 09:38
Extends a type recursively
/**
* Extends a type recursively.
*
* @template T - The base recursive type to be extended.
* @template Ext - An additional set of properties to be merged into the type.
* @template Key - The key of the recursive property in T.
*
* @example
* ```ts
* type Node = {