Issue 379 - Make JS reloadTypes variable behaves as a singleton