paint-brush
Using Destructuring and Inline Types Can Hurt Your TypeScript Codebaseby@baransu
1,152 reads
1,152 reads

Using Destructuring and Inline Types Can Hurt Your TypeScript Codebase

by Tomasz CichocińskiOctober 10th, 2022
Read on Terminal Reader
Read this story w/o Javascript

Too Long; Didn't Read

Using destructuring and inline types makes your TypeScript less readable. I want to show you how using destructuring makes it less readable in TypeScript. It discourages creating smaller helper functions and relying on composition to build up your main function logic. There is no natural place to write documentation comments when all the types are cramped with destructuring in the function definition. It's just a lot of space of code and takes a lot-of-space of lines of code. In addition, it focuses on implementation detail in addition to the implementation detail.
featured image - Using Destructuring and Inline Types Can Hurt Your TypeScript Codebase
Tomasz Cichociński HackerNoon profile picture
Tomasz Cichociński

Tomasz Cichociński

@baransu

L O A D I N G
. . . comments & more!

About Author

Tomasz Cichociński HackerNoon profile picture
Tomasz Cichociński@baransu

TOPICS

Languages

THIS ARTICLE WAS FEATURED IN...

Permanent on Arweave
Read on Terminal Reader
Read this story in a terminal
 Terminal
Read this story w/o Javascript
Read this story w/o Javascript
 Lite