Make JS reloadTypes variable behaves as a singleton