paint-brush
使用解构和内联类型可能会损害您的 TypeScript 代码库经过@baransu
1,152 讀數
1,152 讀數

使用解构和内联类型可能会损害您的 TypeScript 代码库

经过 Tomasz Cichociński4m2022/10/10
Read on Terminal Reader
Read this story w/o Javascript

太長; 讀書

使用解构和内联类型会降低 TypeScript 的可读性。我想向您展示如何使用解构使其在 TypeScript 中的可读性降低。它不鼓励创建较小的辅助函数并依赖组合来构建您的主函数逻辑。当所有类型都被函数定义中的解构所束缚时,没有自然的地方可以编写文档注释。它只是大量的代码空间,并且占用了大量的代码行空间。此外,除了实现细节之外,它还关注实现细节。

Companies Mentioned

Mention Thumbnail
Mention Thumbnail
featured image - 使用解构和内联类型可能会损害您的 TypeScript 代码库
Tomasz Cichociński HackerNoon profile picture
Tomasz Cichociński

Tomasz Cichociński

@baransu

I write about TypeScript, React, and Node.js. Exploring real-time rendering and Elixir in spare time.

0-item

STORY’S CREDIBILITY

Code License

Code License

The code in this story is for educational purposes. The readers are solely responsible for whatever they build with it.

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

About Author

Tomasz Cichociński HackerNoon profile picture
Tomasz Cichociński@baransu
I write about TypeScript, React, and Node.js. Exploring real-time rendering and Elixir in spare time.

標籤

Languages

这篇文章刊登在...

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
Also published here