mituri

[TS] class vs interface

Apr 12th, 2018
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. My personal rule of thumb:
  2.  
  3. If I'm dealing with pure data (of varying sources) I use interfaces
  4. If I'm modelling something which has an identity and state (and probably attached methods to modify the state) I'm using a class.
Advertisement
Add Comment
Please, Sign In to add comment