タグ

ProgrammingとInterfaceに関するisdhのブックマーク (1)

  • TypeScript: type vs interface

    In one of my recent PRs I changed all interfaces to types because there were already more types than interfaces. In the review, I was asked to revert the change. I did it, but as well I wondered what the actual difference between interface and type. Let’s figure out this. I use the latest TS (v3.5.1) for examples in this post. Similarities #Records #

    TypeScript: type vs interface
    isdh
    isdh 2020/06/04
    "Not all of those things were possible in early versions of TS, so people got used to interfaces. But in the latest version of TS, it seems that types are more capable and we can always use them 🤔."もはやinterfaceは有害と言えるんじゃないかな
  • 1