Typescript type definition versions

How can I find the correct version of @types/codemirror that correspond to a certain codemirror version?

They are all versioned with 0.0.x which makes it impossible to work out. I thought that the convention was to keep the major.minor version numbers the same?

I don’t know—the typings aren’t maintained by me. But the 5.x interface has been very stable for years, so probably just getting the latest version of both the library and the typings should work well.