Sorry that I was not clear in my original comment, I meant to say that I speculate the ProseMirror codebase itself would have taken massive benefit from type-checking over its lifetime, to reduce the number of bugs the end user would have to track down.