3

I have seen a couple of times questions with just as a language tag getting TypeScript answers, or solutions using other frameworks (like jQuery, lodash, moment.js) that are not mentioned or clearly not used in the question code -- the question author doesn't say it should be answered in vanilla code, nor do they say it's okay if someone suggests using any library.

I sometimes downvote these answers... If it were me I wouldn't have accepted or upvoted them because I would not want to add another dependency to my stack. So I don't think the person who posted the question would want that either.

I also sometimes see a 3-5+ years old question with many answers already where someone sees an opportunity to bump the thread using a TypeScript solution because there where none using TypeScript.

TypeScript is great but, to me, TypeScript and JavaScript are not the same, as TypeScript code can't be executed without being transpiled to JavaScript first.

3
  • 3
    Do distinguish between a transpiler and a library. A library is something you can't get rid of, using a transpiler is not different from having to use a text editor first. Future-proofing the Q+A is not wrong, it was never meant to be static. Some idea what the future might look like: insights.stackoverflow.com/… Apr 14, 2018 at 10:01
  • 1
    You (and Hans) are right about TypeScript: in general, if you use a transpiler, you are writing in a different language. I suspect I would have a torrid time if I began writing PureScript or Haskell answers to [javascript] questions...
    – duplode
    Apr 14, 2018 at 15:38
  • I find these cases difficult to judge. Technically the answers are off-topic, but at the same time I tend to really like it when there are multiple solution paths to a common problem under the same question rather than scattered all over the place. That being said, there is very little need for a TypeScript answer, the conversion from Javascript to Typescript is easy enough that you don't need to just be able to copy/paste solutions.
    – Gimby
    Apr 16, 2018 at 11:49

0

Browse other questions tagged .