lhorie/mithril.js — pull request #254 by zzmp (2014-09-18 00:19:32+00:00)
Title: Document deps

Deps is currently undocumented, even though it is used in the testing suite.

I imagine others using it for server-side (browserless) testing, so I think it should be documented for:
- discoverability
- API stability (if it's in the docs, it can be counted on)

---

This PR contains a few changes:
- Remove deps.factory from the API
- It was undocumented, and only used for an unnecessary test
- Document m.deps
- Add it to the API list
- Create a new markdown file documenting it's use (the signature should be checked)
- Add typescript definition
- I'm not sure if this is necessary, but I assumed the typescript definitions should reflect the documented API
- I do not use typescript, so I am not sure if this is right - make sure to review it!

---

This is a major decision, so I broke it out into atomic commits. If you want one part of it, and are against others, let me know and I can make a new PR with just those commits. I do think it is important to document the testing API, even if it is not used on the client side, but I don't think it would be bad to 'hide' it a little bit so new users aren't exposed to unnecessary complexity (something I did _not_ do).