Ask coding questions

← Back to all posts
How to Make TypeScript Faster
IMightBeMe (33)

I recently started using TS as I enjoyed node and vanilla javascript. The problem is, though, that replit doesn’t have good support for it and takes about a minute for it to run a simple Hello World program. Is there an issue with what I am doing, or is it that replit and typescript don’t go together?

Answered by Coder100 (18903) [earned 5 cycles]
View Answer
Comments
hotnewtop
Coder100 (18903)

Yeah typescript and replit just don't go together very well
the typescript compiler here is pretty slow, I recommend instead making a bash language repl and doing it yourself:

First, type this code to set it up:

npm init -y
npm i typescript
touch index.ts

then, you might want to add a config file. Afterwards, for your bash, do something like this:

node .

and then, in the shell (the other one)
do: npx tsc -w

IMightBeMe (33)

Would I type the

npm init -y
npm i typescript
touch index.ts

in the main.sh file, or in the shell?
@Coder100

IMightBeMe (33)

nvm i think i got it