I am trying to create type definitions for a JavaScript library which is pretty permissive with its schemas. In particular, I\'ve come across a situation where a type