I want to declare a Map<T, K> type and the keys in the map is classes and values of the map should be instances of the corresponding key. For example:
class X {}
type InstanceMap = // the type that I want to declare
const map: InstanceMap = new Map();
map.set( X, new X() );