SetSerializer: {
    serialize: (set: Set<unknown>) => string;
    unserialize: (serializedSet: string) => Set<unknown>;
} = ...

Built-in serializer for Set objects

const uniqueNames = new PersistedStore(
"names",
new Set<string>(),
SetSerializer
);

uniqueNames.value.add("Alice");
uniqueNames.save();