/** * Copies each element of an `ImmutableMap` into a new `ImmutableMap`. * * @tsplus getter ImmutableMap copy */ export function copy(self: ImmutableMap): ImmutableMap { const map = new Map() for (const [key, value] of self.internalMap) { map.set(key, value) } return new ImmutableMap(map) }