This looks like a super interesting thing PR. Would you be willing to rebase on develop ?
I unfortunately have covid right, and it's got me pretty worn down.
After I recover, it could be a fun project though! I'll set a reminder for myself in a week or so, and see if it's something I can take care of. (I'm no longer working on the project I was hoping to use this for, though, so no promises.)
I remember there being a bunch of other things that could use strict typing to greatly improve the library, too, but I can't remember exactly what. I'll try to note those things if I'm able to work on it.