Ask coding questions

← Back to all posts
User input in ts
JacobMcPherson1 (195)

how do you get user input in Typescript?

xxpertHacker (860)

There seems to be a misunderstanding of what TS is here, TS compiles to JS, it doesn't provide anything that JS doesn't have.

You should use whatever JS API is available, with TS typings to ensure that it is being used correctly.

I don't know how to accept input in Node.js, but in Deno I've got an example: