Conversation
So that we can check whether an object correctly implements the `Disposable` contract.
spec/disposable-spec.coffee
Outdated
There was a problem hiding this comment.
Usually we don't denote these class methods w/ the ::, because that's coffee-script notation for referring to properties on a prototype.
There was a problem hiding this comment.
Sounds good, I had a look at how we did it in text-buffer and I mistakenly assumed it was a standard to refer to every kind of method.
Thanks for pointing this out! 👍
|
Other than the one comment, looks good to me! Thanks for doing this. |
There was a problem hiding this comment.
Is the existential operator needed here? It might be useful to blow up if you're accidentally passing in a null or undefined object
There was a problem hiding this comment.
Generally, I could go either way, but I think it's good to imitate Array.isArray, Number.isNaN et al in this case. They return false when passed null or undefined.
|
🚢 |
|
❤️ |
|
I like this approach. Less obtrusive. |
So that we can check whether an object correctly implements the
Disposablecontract, as discussed in #12./cc: @maxbrunsfeld @nathansobo @kevinsawicki