taken from https://codemirror.net/doc/manual.html#modeapi
Eventually we'll need to add in the actual mode object but that's a whole different beast.
I couldn't find documentation on lastColumnPos, lastColumnValue, or lineStart. Let me know if it's alright to just leave them undocumented. Thanks!
Previously the module name couldn't match the global function name, so we had to declare module 'CM' and function CodeMirror.
Now that TS can handle the naming clash correctly, we will go to the naming convention from CodeMirror docs.
Additionally, that allows using constructor for CodeMirror.Doc. Previously because of naming CM.Doc that wouldn't work.
Note that CodeMirror itself is not declared as a class, even though their actual implementation does allow 'newing' it internally. However, that is not advertised in the docs, so we assume it is a quirk for some edge case compatibility and leaving it out of the API declarations here.
This enables each definition to have a readme if necessary.
Also a .json metadata file to help with package managers.
And last, to have different versions of the definitions.