TYPESCRIPT1 MIN READ

Type Inference as Documentation
POSTED ON: 2024-01-22
We have been taught to be explicit. But in a language as smart as TypeScript, redundancy is noise. Noise hides bugs.
If a function returns a string, and the compiler knows it returns a string, adding : string is an act of distrust.
Let the types speak for themselves.
END_OF_FILE