• rmam@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    1 year ago

    TypeScript is not type-safe

    I think the blogger is trying to turn a normal aspect of software development into a typescript-specific issue. Of course input data needs to be parsed and validated, and that implies also type deduction and narrowing conversions.

    This is not a typescript problem.

    What’s the type of a string? What if the string actually holds a JSON object? What if the JSON object matches a specific format? Unless you parse the string and instantiate an appropriate object, you still have a string.

    This is not a typescript issue.

    All in all, this article is not worth a click. It’s clickbait void of any meaningful content to fuel self-promotion.