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

Why is Babylon.js developed using TypeScript?

Babylon.js is a big project with increasing contributions since its creation on GitHub. It provides you with a lot of functions and, sometimes, with a lot of parameters for more flexibility. The TypeScript language is useful for robust code as its goal is to improve and secure the production of JavaScript code.

The TypeScript language

TypeScript (TS) is a free and open source language developed by Microsoft. It is a compiled language to produce JavaScript (the TS code is, in fact, transcompiled) and provides a static typing system, which is optional. The typing system is used in Babylon.js in order to get a cleaner and more descriptive code. It means that if a function has a lot of parameters, it's easier to fill and understand them instead of always using the documentation as a reference. Moreover, it allows developers to declare classes (as the ECMAScript 6 specifications do) and interfaces for a better understandable architecture and structure of code.

The TypeScript features

The typing system is powerful as it allows developers to create interfaces, enumerated types, and classes and handle generics and union typing. Overall, developers use the typing system for a better understanding and security of the libraries that they are building and using.

The TS language supports inheritance (classes) and also provides access specifiers (private / public / protected) to modify the access rights for the classes' members. Then, developers can see at a glance the members that they can use and modify.

主站蜘蛛池模板: 新和县| 黔南| 松原市| 宜春市| 泗洪县| 汨罗市| 宁乡县| 闽清县| 综艺| 和田县| 北碚区| 烟台市| 崇仁县| 通辽市| 瑞丽市| 玉林市| 鸡西市| 若尔盖县| 平乐县| 茂名市| 泾源县| 木兰县| 金阳县| 龙口市| 雷州市| 大冶市| 马公市| 松滋市| 绥江县| 屯门区| 无锡市| 汽车| 泊头市| 高青县| 朝阳市| 莱阳市| 怀宁县| 兴化市| 南京市| 托克逊县| 大洼县|