TISTUD-6750 Javascript indexing isn't aware of constructor functions for generating types