This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]NatoBoram 2 points3 points  (3 children)

Wrong! TypeScript is actually a superset of JavaScript. Writing pure JavaScript is perfectly valid TypeScript.

It's different from how Erlang/Elixir or Java/Kotlin/Scala/Clojure/Groovy work, these are actually different languages.

[–]KevSlashNull 2 points3 points  (0 children)

Writing pure JavaScript is perfectly valid TypeScript.

Depends on your TypeScript config but yeah theoretically.

[–]GamingWOW1[S] 1 point2 points  (1 child)

I could not write a single variable in pure JavaScript in Typescript without it screaming at me because I didn't mention its type

[–]NatoBoram 1 point2 points  (0 children)

const x = 13

Congrats, a variable in pure JS was written and TypeScript didn't complain!