Decision tree between ES5, ES6 and TypeScript

Do you mind having a build step?

  • Yes - Use ES5
  • No - keep going

Do you want to use types?

  • Yes - Use TypeScript
  • No - Use ES6

More Details

ES5 is the JavaScript you know and use in the browser today it is what it is and does not require a build step to transform it into something that will run in today's browsers

ES6 (also called ES2015) is the next iteration of JavaScript, but it does not run in today's browsers. There are quite a few transpilers that will export ES5 for running in browsers. It is still a dynamic (read: untyped) language.

TypeScript provides an optional typing system while pulling in features from future versions of JavaScript (ES6 and ES7).

Note: a lot of the transpilers out there (i.e. babel, TypeScript) will allow you to use features from future versions of JavaScript today and exporting code that will still run in today's browsers.

Answer from Brocco on Stack Overflow
Top answer
1 of 2
667

Decision tree between ES5, ES6 and TypeScript

Do you mind having a build step?

  • Yes - Use ES5
  • No - keep going

Do you want to use types?

  • Yes - Use TypeScript
  • No - Use ES6

More Details

ES5 is the JavaScript you know and use in the browser today it is what it is and does not require a build step to transform it into something that will run in today's browsers

ES6 (also called ES2015) is the next iteration of JavaScript, but it does not run in today's browsers. There are quite a few transpilers that will export ES5 for running in browsers. It is still a dynamic (read: untyped) language.

TypeScript provides an optional typing system while pulling in features from future versions of JavaScript (ES6 and ES7).

Note: a lot of the transpilers out there (i.e. babel, TypeScript) will allow you to use features from future versions of JavaScript today and exporting code that will still run in today's browsers.

2 of 2
116

I've been using Typescript in my current angular project for about a year and a half and while there are a few issues with definitions every now and then the DefinitelyTyped project does an amazing job at keeping up with the latest versions of most popular libraries.

Having said that there is a definite learning curve when transitioning from vanilla JavaScript to TS and you should take into account the ability of you and your team to make that transition. Also if you are going to be using angular 1.x most of the examples you will find online will require you to translate them from JS to TS and overall there are not a lot of resources on using TS and angular 1.x together right now.

If you plan on using angular 2 there are a lot of examples using TS and I think the team will continue to provide most of the documentation in TS, but you certainly don't have to use TS to use angular 2.

ES6 does have some nice features and I personally plan on getting more familiar with it but I would not consider it a production-ready language at this point. Mainly due to a lack of support by current browsers. Of course, you can write your code in ES6 and use a transpiler to get it to ES5, which seems to be the popular thing to do right now.

Overall I think the answer would come down to what you and your team are comfortable learning. I personally think both TS and ES6 will have good support and long futures, I prefer TS though because you tend to get language features quicker and right now the tooling support (in my opinion) is a little better.

🌐
GeeksforGeeks
geeksforgeeks.org › typescript › difference-between-es6-and-typescript
Difference Between ES6 and TypeScript - GeeksforGeeks
July 15, 2025 - TypeScript, a superset of ES6, enhances JavaScript with static typing, interfaces, and advanced tooling, providing developers with better error detection and code organization capabilities for more robust web applications.
Discussions

ES6 vs Typescript
TypeScript outputs ES6, which can then be transpiled into ES5 by Babel. More on reddit.com
🌐 r/javascript
25
13
December 1, 2015
TypeScript class vs function exports
I prefer to only use what is needed for the use case at hand. So generally i prefer pure functions up until the point it no longer makes sense. I tend to think of a package/module as a conceptual unit so exporting individual static functions that way feels clean. More on reddit.com
🌐 r/typescript
195
17
June 8, 2024
What is your preference: typescript or javascript?
TypeScript The entire team gains better visibility over the codebase. It forces everyone to document their intent and holds them to their word. It makes documentation easier to understand across language barriers. It validates suggestions made by AI tools. It highlights errors in every corner of the app without needing to run a regression test. It speeds up initial dev time by forcing people to consider feature architecture. It calls out edge cases, like missed null checks. I think it's becoming a marker that separates hobbyists from professionals. Like in carpentry, we all like to bang together the occasional side project from scrap wood, and there's nothing wrong with that. Just don't go eyeballing measurements when it's time to work on someone's house. More on reddit.com
🌐 r/webdev
255
108
August 19, 2023
ES6 vs ES2022: can we study ES6 first then proceed with ES2022 later?
Not much has changed since es6. Just a few more methods and things. Just focus on es6. You'll be good More on reddit.com
🌐 r/learnjavascript
13
17
May 24, 2023
🌐
Reddit
reddit.com › r/javascript › es6 vs typescript
r/javascript on Reddit: ES6 vs Typescript
December 1, 2015 -

I'm prototyping a new modern version of a legacy production web application. Right now I'm using ES6 (babel), react, redux.

I do like some features of ES6 such as good support for classes, decorators, block-scoped bindings.

I was hoping to see what the reddit JS community thought about Typescript compared to ES6. Obviously typescript supports types. It also has a strong group of engineers behind (including the architect of C#) it so it might be here to stay and flourish over the next few years. Can projects use both typescript and ES6 without significant hacking? Feel free to share your own general opinions about the projects.

🌐
TypeScript
typescriptlang.org › docs › handbook › release-notes › typescript-1-5.html
TypeScript: Documentation - TypeScript 1.5
TypeScript used the module keyword to define both “internal modules” and “external modules”; this has been a bit of confusion for developers new to TypeScript. “Internal modules” are closer to what most people would call a namespace; likewise, “external modules” in JS speak really just are modules now. Note: Previous syntax defining internal modules are still supported. ... ES6 let and const declarations are now supported when targeting ES3 and ES5.
🌐
Cynoteck
cynoteck.com › home › blog › typescript vs javascript vs ecmascript – know the difference
TypeScript Vs JavaScript Vs ECMAScript – Know The Difference
March 27, 2026 - TypeScript Code can be changed over into plain JavaScript Code. Better code organizing and object-arranged programming procedures. Permits better advancement time instrument support.
Find elsewhere
🌐
Quora
quora.com › Which-one-is-the-best-ES6-or-Typescript-for-Node-API
Which one is the best ES6 or Typescript for Node API? - Quora
Answer: Typescript is a language which compiles to JavaScript. Es6 is plain JavaScript which adds additional features like classes, arrow functions. It's better to use es6. Note: coffee script was famous once now outdated. The same may happen to typescript. So learn vannila JavaScript.
🌐
DEV Community
dev.to › joshthecodingaddict › js-vs-ts-a-comprehensive-guide-to-choosing-the-right-programming-language-577l
JS vs TS: A Comprehensive Guide to Choosing the Right Programming Language - DEV Community
January 29, 2023 - On the other hand, TypeScript has static type checking, which means that the type of a variable must be specified at compile time and cannot change dynamically during runtime. For example: let x: number = 42; x = "Hello"; // Type '"Hello"' is ...
🌐
Quora
quora.com › Should-I-use-TypeScript-or-ES6
Should I use TypeScript or ES6? - Quora
Answer (1 of 4): There’s no correct answer here as a lot depends on your needs and experience. What I would say is that a lot of frameworks, companies and individual developers are adopting TypeScript to make use of the type checking and flexible features TypeScript offers whilst writing code. ...
🌐
DECODE
decode.agency › article › javascript-vs-typescript
JavaScript vs TypeScript: detailed comparison | DECODE
October 20, 2025 - ES5 (2009) was the standard for years, but ES6 (2015) changed the game.
🌐
Medium
medium.com › swlh › building-an-es6-application-with-the-help-of-typescripts-dom-types-2867b7d2ad9b
Building an ES6 application with the help of TypeScript's DOM types | by Liliana Nuño Silva | The Startup | Medium
August 19, 2019 - Building an ES6 application with the help of TypeScript's DOM types Write an ES6 app using the right tools. In this article, I propose a way of writing relatively simple apps without using a …
🌐
Medium
medium.com › @AlexanderObregon › typescript-vs-javascript-the-pros-and-cons-of-each-language-da526dc0941d
TypeScript vs. JavaScript — The Pros and Cons of Each Language
April 24, 2024 - TypeScript is a superset of JavaScript, which means that every valid JavaScript code is also valid TypeScript code. TypeScript introduces optional static typing, allowing developers to catch errors at compile time instead of runtime.
🌐
GraffersID
graffersid.com › typescript-vs-javascript-what-are-the-differences
TypeScript vs. JavaScript: What Are The Differences in 2026?
November 27, 2025 - Supports Interfaces, sub-interfaces, classes, and subclasses are supported by ES6. ... Rich IDE is accessible with code navigation and completion functions. Involves the inheritance of private members and interfaces, class-based object-oriented. It’s true that JavaScript can be an excellent option for your development projects. When it comes to choosing between TypeScript vs JavaScript, the choice actually depends on your needs.
🌐
Curotec
curotec.com › home › insights › typescript vs javascript: which one should you use in 2026?
TypeScript vs JavaScript: Which One Should You Use in 2026? - Curotec
April 24, 2026 - You still run JavaScript under the hood but with a layer of intelligence sitting on top. And, with editor support like IntelliSense, TypeScript turns your IDE into a real-time assistant—highlighting errors, predicting values, and helping you ...
🌐
AltexSoft
altexsoft.com › blog › typescript-pros-and-cons
Pros and Cons of TypeScript: When and Why It’s Better than
February 14, 2020 - This review of TypeScript pros and cons explains why this language outshines JavaScript in enterprise-level projects.
🌐
GeeksforGeeks
geeksforgeeks.org › gblog › 8-reasons-why-you-should-pick-typescript-over-javascript
8 Reasons Why You Should Pick TypeScript Over JavaScript - GeeksforGeeks
August 5, 2025 - TypeScript is considered the best programming language for implementing large-scale or enterprise-level applications. Due to its 'type' feature, it becomes easily understandable for developers to read which in return takes less time in ...
🌐
Stackademic
blog.stackademic.com › leveraging-es6-and-typescript-features-for-optimal-development-24ac4f9d59fd
Leveraging ES6 and TypeScript Features for Optimal Development | by J.D Christie | Stackademic
June 18, 2024 - It has become the de facto standard for JavaScript development and has been widely adopted by contemporary browsers. Conversely, TypeScript is a superset of JavaScript that includes advanced language features and optional static typing.
🌐
Study.com
study.com › computer science courses › computer science 104: intro to web development
ECMAScript and TypeScript | Study.com
March 25, 2025 - TypeScript syntax is built upon ES6 syntax features, such as modules, classes, and arrow functions.
🌐
Scribd
scribd.com › document › 931284714 › TypeScript
TypeScript and ES6 Features Overview | PDF
October 10, 2025 - JavaScript is disabled in your browser · Please enable JavaScript to proceed · A required part of this site couldn’t load. This may be due to a browser extension, network issues, or browser settings. Please check your connection, disable any ad blockers, or try using a different browser