pacexy / poro

API of Leaguepedia and League of Legends
MIT License
18 stars 2 forks source link

fix(dtos): use `type` instead of `interface` #50

Closed pacexy closed 10 months ago

pacexy commented 10 months ago
  1. extends is never used in the lib, so we do not need to care about the slow performance of intersection.
  2. type is safer than interface for users, it will not cause issues like "Index signature for type 'string' is missing".
  3. For users need to extend dtos, they can still use intersection, and I think it's not so frequent.

So, in our case, it's better to back to type we previously used.