Completely redone the typings from the docs.

Using 0.9 (generics and override by string literal).
Merge pull request #497 from mihailik/master

Reworked CodeMirror.