<story><title>How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan</title><url>https://chiragswadia.medium.com/how-an-anti-typescript-javascript-developer-like-me-became-a-typescript-fan-a4e043151ad7</url></story><parent_chain><item><author>madeofpalk</author><text>It&amp;#x27;s probably worth taking a step back and interrogating why the actual &amp;quot;Why was I Anti-TypeScript?&amp;quot; a little bit more and use it as an opportunity for broader self development.&lt;p&gt;The author didn&amp;#x27;t use and understand something, and rather than trying to they instead just defaulted to rejection. It&amp;#x27;s midly disapointing seeing this in people who label themselves as &amp;quot;Senior&amp;quot;.</text></item></parent_chain><comment><author>lhorie</author><text>Ironically, as someone who has experience w&amp;#x2F; both fast-and-loose JS and with &amp;quot;properly&amp;quot; statically typed languages, my beef with typescript is precisely that it allows people to be fast and loose, sometimes in ways that are not super obvious. For example:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    type Thing = {
        name: string,
    };

    function getThing(): Thing {
        return JSON.parse(&amp;#x27;{&amp;quot;error&amp;quot;: &amp;quot;invalid id&amp;quot;}&amp;#x27;)
    }

    const thing: Thing = getThing(); &amp;#x2F;&amp;#x2F; lie to me!
    console.log(thing.name);
&lt;/code&gt;&lt;/pre&gt;
This is a trivial example to illustrate the idea that it&amp;#x27;s relatively easy to make a type that cascades through a very large app but which is backed by a complete lie.&lt;p&gt;I definitely think that there&amp;#x27;s also something to be said about meta-programming yak shaving (e.g. people wasting hours trying to write a &amp;quot;function&amp;quot; that takes an enum and outputs another enum w&amp;#x2F; a fixed prefix, when simply writing out the enums would&amp;#x27;ve taken 30 seconds w&amp;#x2F; VSCode&amp;#x27;s multiple cursor feature)&lt;p&gt;Personally, the value I see in TS is in cementing documentable facts about a system: e.g. such and such function takes such and such well-defined entity, dot not treat this `options` argument as a generic bucket for pass-through garbage.</text></comment>
<story><title>How an Anti-TypeScript “JavaScript developer” like me became a TypeScript fan</title><url>https://chiragswadia.medium.com/how-an-anti-typescript-javascript-developer-like-me-became-a-typescript-fan-a4e043151ad7</url></story><parent_chain><item><author>madeofpalk</author><text>It&amp;#x27;s probably worth taking a step back and interrogating why the actual &amp;quot;Why was I Anti-TypeScript?&amp;quot; a little bit more and use it as an opportunity for broader self development.&lt;p&gt;The author didn&amp;#x27;t use and understand something, and rather than trying to they instead just defaulted to rejection. It&amp;#x27;s midly disapointing seeing this in people who label themselves as &amp;quot;Senior&amp;quot;.</text></item></parent_chain><comment><author>cosmotic</author><text>I think the skepticism of new shiny things is healthy. Of the set of things that exist, most things are worse than the things one already uses&amp;#x2F;prefers. Most new things solve a specific problem that may not overlap with the problems one is trying to solve. With software development, a huge part of the puzzle is tooling (as the article points out), so even if typescript is obviously superior as a language, the tooling needs to catch up before it&amp;#x27;s a reasonable&amp;#x2F;useful alternative. In this case, the tooling quality, enabled by the static typing, shot typescript way past the thing it was replacing.</text></comment>