I ended up using the manifest. It would be nice to support `Any` as a type parameter, but this only supports a limited set of types. I did document the supported types in the ScalaDoc.