import { IParallelEnumerable } from "../../types" ; import { typeDataToArray } from "./_typeDataToArray" ; param source returns export const toSet = async < TSource > ( source ) : Promise < Set < TSource > > => { const dataFunc = source . dataFunc ; const values = await typeDataToArray ( dataFunc ) ; return new Set < TSource > ( values ) ; } ;