Ask coding questions

← Back to all posts
TypeScript HTML5 Project?
h
NimaiMalle

When I make a new JavaScript project, I get an index.html page and can do client-side coding. When I make a new TypeScript project, it looks like it's tailored to node server development. How can I make an html project that uses TypeScript? Thanks!

Voters
squeegily
solly_ucko
NimaiMalle
Comments
hotnewtop
squeegily

Ugh. This is killing me, too! So many client-side libraries use TypeScript, export, or a bunch of other stuff that needs to be compiled; I hate being unable to use these with replit...

NimaiMalle

I did try just renaming the index.js file to index.ts in simple web project. It went from working to not working - no error. TypeScript linting appeared to be going on in the IDE but when I run, I just get a blank screen for the "result" and no errors in the console.

I think what's needed is a new project type: "HTML, CSS, TS"

ArchieMaclean

Try making a html/js/css repl and make a typescript file? May not work though :P

NimaiMalle

@ArchieMaclean Yeah, that's the first thing I tried.

themaka

@NimaiMalle - you'll get a bit of extra stuff you may not need, but if you use https://repl.it/languages/reactts you'll get the ability to use TS with web technologies.

8Observer8

@themaka I cannot run this example. I see errors. How to run it?