• FizzyOrange@programming.dev
    link
    fedilink
    arrow-up
    5
    ·
    3 months ago

    Yes because you used static type annotations. This thread was about code that doesn’t use static types (or static type annotations/hints).

    • Eiri@lemmy.ca
      link
      fedilink
      arrow-up
      1
      ·
      3 months ago

      Nope, don’t need to. WebStorm can even detect nonexistent attributes for objects whose format the back-end decides, and tbh I’m not sure what sort of sorcery it uses.

      • FizzyOrange@programming.dev
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        Yeah IntelliJ does amazingly without type annotations but even it can’t do everything. E.g. if you’re using libraries without type annotations, or if you don’t call functions with every possible type (is your testing that good? No.)

        Static types have other benefits anyway so you should use them even if everyone in your team uses IntelliJ.