Web DevelopmentWeb development: TypeScript - pros & cons
Channel Marketing Manager
Backend & DevOps Tech Leader
Frontend & Mobile Tech
Table of contents
Share the article
Today, there are many programming languages that web specialists use to create online projects all over the world. Each of the languages has its own advantages and opportunities for the development of original sites, in addition, the convenience of using a particular language when writing high-quality code plays an important role. In this article for MRBlog, we will consider all the features and characteristics of the TypeScript language, which was developed by the world-famous Microsoft company. The language specifications are open and published under the Open Web Foundation Specification Agreement.
Among the main features of the TypeScript language , we highlight the following:
the TypeScript language is strongly typed;
TypeScript opens up many opportunities for web professionals. First of all, the technology for working with. You can also inherit interfaces (including multiple inheritance), classes. You can describe your own data types and create generic interfaces. You can also describe the type of variable (or object properties), or describe what interface the object referenced by the variable should have. And, if necessary, describe the signature of the method.
TypeScript was created for large and cumbersome projects that are developed by a team of developers, not individual programmers. Therefore, this language is distinguished by developed development tools, components and the collection of the final project from the file structure, which is largely branched.
What are the advantages of TypeScript in development?
using ECMAScript, which allows the code to work without converting classes;
TS is greatly integrated with multiple IDE's like xxxx. This makes developers live easier through auto-completion functionality. It also helps with refactoring and debugging by type checking during compile time.
It's worth trying to work with TypeScript for many reasons. Among which:
The ability to rigidly describe each element of the application. A web specialist needs to clearly think through the logic of the application up to the moment of implementation. There is no way to change one part of the project, while breaking the other part.
It is possible to describe the scope of class properties.
You need to write fewer tests because of the rigid architecture.
Some of the code formatting errors are excluded due to the rigid format of programming language constructs.
In addition, Microsoft's development is encouraging for long-term support and further fruitful development. In this case, it is worth getting acquainted with this language in more detail and studying it in as much detail as possible.
In addition to all the advantages we’ve written above, Typescript also has some disadvantages:
A significant slowdown in the build of the project. But this, again, is exclusively in our build specifics: Webpack + TS + Babel. Who has the same configuration (+- babel), I can advise you to use the ts-loader loader with the transpileOnly flag, and run TSC in parallel. And in the incremental build mode (--watch), keep 2 processes separate: webpack --watch and tsc --watch.
There are also some problems with NodeJS OutOfMemory errors, such surprises are especially unpleasant when you need to build a project and release a release in 3-4 days, but you can't solve them quickly.
The need to update versions .d.ts for external libraries. Thank God, it's over with tsd > typings. And now everything can be downloaded immediately via npm > @types. What if a new version of the library has been released, lodash for example, and .d.ts is not yet available? Then you have to choose: add it yourself (to the repository or put it on github in the DefinitelyTyped repository) or not use this feature yet.
Search for developers with TypeScript experience. These are individual tears for HR. As far as we know, everyone on the market now has a problem finding “advanced” frontend developers with experience writing serious SPA, Angular|React|Vue, Typescript, Redux, etc.
TOP 10 Identity and Access Management (IAM) and User Management Tools
Explore the top 10 identity and access management solutions that offer robust user management and security for modern digital needs.
Read full article
Unlocking Web Performance: A Deep Dive into Static vs Dynamic Rendering with NextJS
Static vs Dynamic Rendering with NextJS - choose the best implementation for your web app.
Read full article
Explore microfrontends: their benefits, challenges, and managing complexities of micro frontend architecture.
Read full article