Photo by Christopher Gower on Unsplash

Are You a JavaScript or TypeScript Developer?

Jonathan Reeves
3 min readJul 17, 2021

Technically the answer to this is you’re a JavaScript developer. I know. I know. You’re saying “No! I use TypeScript. I don’t use JavaScript. I’m a TypeScript developer.” Well I have heartbreaking news for those of you that think that. While yes you use TypeScript as your programming language of choice. Yes the programming language uses types and is type safe. And, yes you TypeScript is JavaScript for Java or C# developers. But let me blow your mind right now, ready? At the end of the day TypeScript compiles to JavaScript. Also all JavaScript is, depending on how strict you are with your tsconfig.json file, valid TypeScript. Which means if I wanted to just right something like:

const readline = require('readlin');const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
rl.question("What is your name? ",
function(name{
console.log(`${name}`);
}
);
rl.on("close", function() {
console.log("GoodBye");
process.exti(0);
});

And I save that in a .ts file, while the extension says it’s a TypeScript file, and you will need to install the @types file for readline to work properly if you change the filename to .js you won’t have to remove anything from the file as there isn’t anything in there that makes it not a JavaScript file. So at the end of the day a TypeScript developer is just a JavaScript developer that adds types to their program.

Why Do You Hate TypeScript?

I can hear some of you thinking “Man this guy hates TypeScript. What’s the deal?” That is not the case at all. I love TypeScript. I thoroughly enjoy the language as a whole. What I dislike is when people say that JavaScript is a terrible language and that is why I use TypeScript. TypeScript is JavaScript. JavaScript is TypeScript. They are the same language. The difference between the two languages is the rules that are defined for them. So at the end of the day when someone asks me if I am a JavaScript developer or a TypeScript developer my response to the question is yes I am. I just prefer JavaScript with types.

Conclusion

I know this article doesn’t really teach anything and I know that it could ruffle some feathers about the beliefs held above. For me I am a JavaScript developer. It took me awhile to realize it but once I embraced that title and realized that even though I am using TypeScript, even though there are types attached to my functions dictating what the return will be, or what type of data the variables used inside are at the end of the day I write JavaScript. I am a JavaScript developer. Now that I have said that I feel free. Maybe if you are having a hard time wrapping your head around TypeScript it’s because you are refusing to learn the underlying language that is TypeScript, JavaScript.

--

--

Jonathan Reeves
Jonathan Reeves

Written by Jonathan Reeves

I am a software engineer that is currently trying to break into the DevOps world using Python. Professionally I use JavaScript with React to build websites.

No responses yet