Last month, Microsoft announced its support for a proposal for “further development of JavaScript and TypeScript”, and although this is a so-called Phase 0 proposal, Microsoft has announced that it hopes to submit the proposal to TC39 (Technical Committee 39) on time. Some developers in the industry say that if this proposal is adopted and implemented, it will be a big change for JavaScript and TypeScript.

Microsoft

20 Years of JavaScript

Looking back over the last 20 years, if we compare web development now and then, we see that while JavaScript as a programming language has evolved a lot, the ecosystem around JavaScript has progressed and evolved a lot.

The reasons for this are, first, that the JavaScript community has become more professional over the last 20 years, and second, that a fundamental problem of the Internet has become increasingly important. At the same time, both of these points are needed for each other.

javascript

As we all know, as developers, we have no control over which browsers our users will use. This means that users can only use the latest features of JavaScript if they update their browsers regularly. This of course sums up the situation for individual users, as many browsers now update automatically, or instruct updates without being asked.

However, this is not the case for companies (perhaps due to strict corporate rules about software and software updates). Many companies often use outdated software or surf the web with outdated browsers, which also affects HTML and CSS, in addition to programming languages that have to be interpreted by their respective browsers and are therefore highly dependent.

At this point, as a web developer, we will have to choose between two ideas: either rely on modern JavaScript, CSS or HTML features that simplify programming or bring better results in terms of usability, or fail to provide these modern features to everyone due to outdated browsers (upgrades may lead to bugs for a certain number of users).

On top of that, there hasn’t been a decent JavaScript module system in decades. Node.js, on the other hand, has gained a standard through CommonJS, but this is limited to the server.

About a decade ago, nothing was happening in the browser for a long time, which is why Bundler came along with transpiler. Even though you were using a JIT (just-in-time) compiled programming language that could execute properly, you always had to deal with a complex build process to convert source code to actual code that could then be executed and interpreted in the browser (which was the case about a decade ago).

The Rise of TypeScript

Ten years ago, Microsoft invented TypeScript, thinking that “if you need a transpiler to convert JavaScript code before you deploy it, it’s no big deal to add a step to the build process”.

In the process, developers get a transpiler that converts modern JavaScript into normal JavaScript. In addition, TypeScript is a static type system that makes JavaScript more scalable and makes an important contribution to teams developing JavaScript efficiently.

It’s no wonder that TypeScript was quickly established and became the standard for enterprise JavaScript development today.

TypeScript

Now, ten years later, the world has changed. While those browsers that are not updated are still “alive”, they play a much smaller role today than they did in the past.

So, for browsers like Evergreen, which now works without a transpiler, there is an ESM (ECMAScript Module) that includes a native JavaScript-based module system that works both server-side and client-side.

This makes bundler unnecessary, at least from a technical point of view. bundler is just one more step in optimizing HTTP requests so that fewer small files can be loaded from the server and only a few large ones can be loaded. At the same time, the build process will gradually become simpler or more irrelevant.

For now, Microsoft expects that the only necessary tool left in the future is the TypeScript compiler, because web browsers and other JavaScript runtime environments simply can’t understand TypeScript.

In other words, Microsoft or TypeScript has suddenly gone from a very useful tool to a rather “annoying” thing. In response, Microsoft says they don’t want to be a hindrance; instead, they want to inspire developers.

Of course, Microsoft has some concerns – sooner or later, JavaScript development will be as fast, straightforward, and efficient as it was 20 years ago, because without TypeScript, the Transpiler will sooner or later be obsolete.

Currently, one way to allay concerns is to require TypeScript integration in web browsers and other runtime environments as an alternative programming language to JavaScript. In theory, this is not far-fetched.

Also, TypeScript is now a more complex programming language, and Microsoft does not want to integrate all the features of the TypeScript compiler directly into common web browsers. That would be a very complex task that would require the cooperation of Apple, Google, Mozilla and others to integrate a big new standard.

Of course, Microsoft doesn’t want to do that, hence the new proposal for “further development of JavaScript and TypeScript” from March.

ts vs js

So, should TypeScript remain completely independent, or will it become the “new JavaScript”? In any case, we will probably see the development of this proposal in the next few years.