DEV Community

Cover image for Starting typescript project in 2023
Artur
Artur

Posted on • Edited on

Starting typescript project in 2023

It's that time of the year when you are creating a new repo for some reason and the choice is to typescript or not to typescript.
You decided to typescript.
Now you start wondering, what has changed? Did the industry move? Are there better tools to add typescript(since 2022 when you did it last)? What's the fastest typescript compiler? How to make sure intelligence isn't as slow as that one project with tens of thousands of code lines, a mix of ts and js and god knows what else?
Since all I found were those articles express and typescript in 2023 where they would install additional dependency express typescript which would then get discontinued in 2024 and you will be left on your own. IDK about you, but that's not how I do things.

I like to overcomplicate things.
First things first, what runtime?

  • node.js
  • deno
  • bun

Since I am chaos incarnate, and I also like to think about the future a bit, I chose to try bun. Why? It seems like it's striving to have maximum compatibility and in the end I can switch back to node.js + ts-node, or some such.

Install bun

curl -fsSL https://bun.sh/install | bash
Enter fullscreen mode Exit fullscreen mode

Init project

bun init
Enter fullscreen mode Exit fullscreen mode

oh, nice! it generated tsconfig. And I was contemplating writing a huge post on how to have fun and nonintrusive yet good enough tsconfig.

OK! The goal is to write a CLI tool to create fixtures for e2e tests.
I want to it be versatile. In real-life processes, users use mobile apps to enter data. But we are not going to use UI automation tool like Apium just yet, instead, i am going to add an abstraction(so that we can switch to UI automation framework later).

Next post coming soon...

Subscribe, react, and share, if you liked this.
Also, If you have an opinion, I would love to hear it down in the comments.

👋

Top comments (2)

Collapse
 
steffennielse20 profile image
Steffen Nielsen

This is a great round op of questions. I tend to see the majority of developers, just following the hypetrain of new frameworks. without thinking about how the project would look in 1-2 years time. Deno just released their first production ready version, and im still curious to see how it will perform in the next year or so.

I always try to first look for the best solution that fits my business needs first, then i look to see if any new frameworks might be usefull or not. But i always go with the idea, that v1 of each new framework is not worth it yet.

But what i have learned, is that it is always worth it, to ensure that the project im developing, can be completly migrated to another framework without much work. This of course cost up front in development time, but i believe it to be better to be prepared for the future, than just joining a hype train.

Hype trains are for entertainment, not for software development.

Collapse
 
dachia profile image
Artur

But i always go with the idea, that v1 of each new framework is not worth it yet.

So true. V1 is usually for hobbyists and for "my first home page" type of projects.

But what i have learned, is that it is always worth it, to ensure that the project im developing, can be completly migrated to another framework without much work

Couldn't agree more, without proper abstractions in long-lived projects you are going to pay for an initial development speed boost of a framework 1000x in later project stages. At least that's my subjective experience