API Reference > bentleyjs-core > Collections > ReadonlyOrderedSet > constructor constructor Method Construct a new ReadonlyOrderedSet. ReadonlyOrderedSet<T>(compare: OrderedComparator<T, T>, clone: CloneFunction<T> = shallowClone): ReadonlyOrderedSet<T> Parameter Type Description compare OrderedComparator<T, T> The function used to compare elements within the set, determining their ordering. clone CloneFunction<T> The function invoked to clone a new element for insertion into the set. The default implementation simply returns its input. Returns - ReadonlyOrderedSet<T> Defined in core/bentley/src/OrderedSet.ts Line 24 Last Updated: 12 June, 2024