官术网_书友最值得收藏!

Foreword

When TypeScript was officially announced on October 1, 2012, the only docs available was the dense official language specification. It was not easily accessible to beginner developers as there was significant focus on syntax. Additionally, it assumed an existing intimate knowledge of JavaScript. Nevertheless, it was complete in terms of TypeScript features at the time, and JavaScript was not as feature-rich as it is today. So, it was a plausible entry point into TypeScript, and that is what I and many others at the time used to learn TypeScript.

How times have changed. Over time, TypeScript has gained a number of features, and so has JavaScript. Keeping up to date now means following relevant GitHub issues and pull requests on Microsoft/TypeScript and reading up on the understanding offered by key developers. Remo is one of those key developers. I got introduced to Remo through his insightful comments on TypeScript issues and then discovered his blog (blog.wolksoftware.com). Remo's blog has been a great help in dissecting important features such as JavaScript decorators and explaining how they are implemented in TypeScript. I find myself linking fellow developers to his docs instead of the alternatives due to the high quality of his work.

Not only has Remo been a great help in understanding TypeScript (and JavaScript), but he has also been a great asset to the TypeScript library ecosystem. One question that I commonly receive from developers is how to do dependency injection in TypeScript. My answer is always a direct link to Remo's extremely useful InversifyJS library (inversify.io).

One of the key concerns that uninformed developers have had about TypeScript is "it only supports object-oriented programming." That is simply not true. TypeScript supports all JavaScript paradigms, and functional programming has first-class support. In fact, it provides a vital piece of famous functional programming languages (compile-time type information) for JavaScript developers.

All programming tasks can be considered as simple (data plus data transformation). This is the mental model encouraged by functional programming aficionados. To have a deep understanding of functional programs as a data transform pipeline, you need a way to define your data structures. This is what is only provided by TypeScript. In the absence of TypeScript, you see various (somewhat arbitrary) syntax elements used to describe the data structures that are flowing through your functional programs.

So, if you want to do world-class functional programming and your programming environment forces you (if only by convenience) to use JavaScript, please consider TypeScript and know that you are not alone. Remo H. Jansen is here to help you.

 

Basarat Ali Syed

Microsoft MVP and one of the leading global references of the TypeScript community.

主站蜘蛛池模板: 大荔县| 夏邑县| 宜兴市| 车致| 禄劝| 湖南省| 乌海市| 阳信县| 宾川县| 朝阳县| 新宁县| 隆化县| 金门县| 苍溪县| 黔南| 黄梅县| 温宿县| 白城市| 广南县| 石嘴山市| 平度市| 云龙县| 张北县| 三河市| 太谷县| 偏关县| 寻甸| 礼泉县| 黑河市| 开原市| 西贡区| 冕宁县| 增城市| 广元市| 合肥市| 峨边| 小金县| 宁都县| 林西县| 云浮市| 离岛区|