Run the code below with node --expose-gc. One might expect the output to be value, but it actually prints undefined.
import { Tuple } from "libtuple";
import { setTimeout } from "node:timers/promises";
const data = new WeakMap();
data.set(Tuple("key"), "value");
await setTimeout();
gc();
console.log(data.get(Tuple("key")));
I think this should be documented under the “Limitations” section of the readme, because I don't see a way to fix this without causing memory leaks.