typescript can perform type checking on the checker property and knows what methods it can do
Don't have to handle index not found errors because typescript knows what properties are present in the resources
In addition I've added a feature to ease() so that if you don't specify the easing type it defaults to cubic-in-out now, because we use that so much, so you can rewrite this:
Otherwise it all looks good. I just wanted to point out where you can improve your code and throw more of the workload on TypeScript instead of you the developer.
I did a code review on Checkers for you @MatthewQualls
Overall it was good, but there were some potential problems:
So you had lines like these:
the correct way to code this is:
Doing this has a few advantages:
checker
property and knows what methods it can doIn addition I've added a feature to
ease()
so that if you don't specify the easing type it defaults to cubic-in-out now, because we use that so much, so you can rewrite this:to this:
Otherwise it all looks good. I just wanted to point out where you can improve your code and throw more of the workload on TypeScript instead of you the developer.