Quantcast
Channel: Active questions tagged questions - Meta Stack Overflow
Viewing all articles
Browse latest Browse all 613

TypeScript in Stack Snippets

$
0
0

Lately, I have seen various questions that use TypeScript in Stack Snippets. They look like this:

There is a problem with my code. Instead of doing x, it does y. Here is my code:

function doSomething(input: string) {  // Do something  console.log("function");}doSomething("something");

When compiled into JavaScript, no errors are thrown.

Obviously, we can see a few problems here.

  1. If there are other errors, we might not be able to see them.
  2. We can't see what the asker is trying to do.
  3. We can't see the issue that they are having.

What can we do about this?


Viewing all articles
Browse latest Browse all 613

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>