JS backend: add support for reflection types
JS backend: support for reflection
JS backend: tests for reflection support