1y
Rant about Javascript (Typescript) This is impressively dumb, I hate this language:
let m= new Map();
m.set({foo:2}, 23)
// Map { {…} → 23 }
m.set({foo:2}, 42)
// Map { {…} → 23, {…} → 42 }



Yes, I understand
why it is happening, that doesn’t change that it is fucking stupid!

How do I do this properly?

3
0
0
0
User avatar
pathetic piss kitten @kitten@elizabeth.cat
1y
Rant about Javascript (Typescript) @Fiona look I don't know what a Map with an object as a key is supposed to be

but I think I agree with it not working
2
0
0
0
User avatar
pathetic piss kitten @kitten@elizabeth.cat
1y
Rant about Javascript (Typescript) @Fiona conceptually speaking the value your trying to store would be directly inside the object, or... I guess stringify it before using it as key?
0
0
0
0