TypeScript Recursive Type Aliases Explained

A Deep Dive into TypeScript Recursive Type Aliases

Sunny Sun
Level Up Coding
Published in
4 min readMar 6, 2023

--

recursive
Photo by Lysander Yuen on Unsplash

Before TypeScript 3.7, a recursive type reference will cause the TypeScript compiler to throw a circular references error message. Developers must make a workaround (i.e., using an interface) to achieve a recursive reference.

--

--

I am full stack developer. Love coding, learning, writing. Checkout my NestJS course: https://shorturl.at/cpJM7, visit my blog https://sunnyy02.github.io