-
rimbu 0.12.3 via Deno: I've tried a variety of imports, with the same error, current code is: import { OrderedSet } from "rimbu/ordered/mod.ts"
const foo = OrderedSet.empty<string>() which gives the error:
However, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The ordered collections take an existing collection and add the order administration to them. Therefore, the To instantiate ordered sets, there are the following options:
If you don't need your collection to be sorted, the Let me know if you need more information. |
Beta Was this translation helpful? Give feedback.
The ordered collections take an existing collection and add the order administration to them. Therefore, the
OrderedSet
can be seen as an interface that can be used for all ordered sets.To instantiate ordered sets, there are the following options:
OrderedHashSet
to have an ordered collection that internally uses aHashSet
. So this would becomeOrderedHashSet.empty<string>()
OrderedSortedSet
to have an ordered collection that internally uses aSortedSet
. So this would becomeOrderedSortedSet.empty<string>()
OrderedSet.createContext(...options...).empty<string>()
If you don't need your collection to be sorted, the
Orde…