Effect CommunityEC
Effect Community3y ago
29 replies
Steff

Questioning the Correctness of the .set Function in TypeScript's HashMap Implementation

Hi, I don't wanna pollute the previous passionate thread on HashMap ^^ but was wondering about the .set function if the following is correct:
interface A {
  a: string;
}

//TS Error - normal
const objectA: A = {}; 

//No TS Error.. hm??
const mapA = pipe(HM.empty<number, A>(), HM.set(0, {}), HM.set(1, {}));
Was this page helpful?