Open js-choi opened 2 years ago
Why separate classes rather than a constructor options bag parameter to the existing Map and Set?
Reusing Map and Set and extending them with option bags is another API option. I’ve tweaked this issue’s original post to say that this issue assumes that we’re going with separate classes as per #8 or #5.
I’m inclined to agree with https://github.com/tc39/proposal-policy-map-set/issues/1#issuecomment-1199766146, but we probably should talk about that more in #1.
Let’s assume that we make new classes rather than using Map and Set (see #8 and #5). Given that, we now have two or three possible parameters:
There are several API choices that I can think of: