@rimbu/sorted
Advanced tools
Comparing version 0.9.17 to 0.9.18
@@ -103,3 +103,3 @@ import { EmptyBase, NonEmptyBase } from '@rimbu/collection-types/map-custom'; | ||
}; | ||
abstract source?: { | ||
abstract source?: undefined | { | ||
min<O>(otherwise?: OptLazy<O>): E | O; | ||
@@ -110,4 +110,4 @@ max<O>(otherwise?: OptLazy<O>): E | O; | ||
}; | ||
abstract _entries?: E[]; | ||
abstract _children?: SortedBuilder<E>[]; | ||
abstract _entries?: undefined | E[]; | ||
abstract _children?: undefined | SortedBuilder<E>[]; | ||
abstract get children(): SortedBuilder<E>[]; | ||
@@ -117,3 +117,3 @@ abstract set children(value: SortedBuilder<E>[]); | ||
abstract prepareMutate(): void; | ||
abstract createNew(source?: unknown, entries?: E[], children?: SortedBuilder<E>[], size?: number): SortedBuilder<E>; | ||
abstract createNew(source?: undefined | unknown, entries?: undefined | E[], children?: undefined | SortedBuilder<E>[], size?: undefined | number): SortedBuilder<E>; | ||
_lock: number; | ||
@@ -120,0 +120,0 @@ checkLock(): void; |
@@ -14,3 +14,3 @@ import { Token } from '@rimbu/base'; | ||
constructor(context: SortedMapContext<K>, source?: SortedMap<K, V> | undefined, _entries?: (readonly [K, V])[] | undefined, _children?: SortedMapBuilder<K, V>[] | undefined, size?: number); | ||
createNew(source?: SortedMap<K, V>, _entries?: (readonly [K, V])[], _children?: SortedMapBuilder<K, V>[], size?: number): SortedMapBuilder<K, V>; | ||
createNew(source?: undefined | SortedMap<K, V>, _entries?: undefined | (readonly [K, V])[], _children?: undefined | SortedMapBuilder<K, V>[], size?: undefined | number): SortedMapBuilder<K, V>; | ||
prepareMutate(): void; | ||
@@ -27,4 +27,4 @@ get children(): SortedMapBuilder<K, V>[]; | ||
modifyAt: (key: K, options: { | ||
ifNew?: OptLazyOr<V, typeof Token> | undefined; | ||
ifExists?: ((currentValue: V, remove: Token) => V | Token) | undefined; | ||
ifNew?: OptLazyOr<V, Token>; | ||
ifExists?: (currentValue: V, remove: Token) => V | Token; | ||
}) => boolean; | ||
@@ -31,0 +31,0 @@ updateAt: <O>(key: K, update: Update<V>, otherwise?: OptLazy<O> | undefined) => V | O; |
@@ -9,3 +9,3 @@ import type { RMapBase } from '@rimbu/collection-types/map-custom'; | ||
* duplicate keys. | ||
* See the [Map documentation](https://rimbu.org/docs/collections/map) and the [SortedMap API documentation](https://rimbu.org/api/rimbu/ordered/map/SortedMap/interface) | ||
* See the [Map documentation](https://rimbu.org/docs/collections/map) and the [SortedMap API documentation](https://rimbu.org/api/rimbu/sorted/map/SortedMap/interface) | ||
* @note | ||
@@ -287,3 +287,3 @@ * - The `SortedMap` keeps the inserted keys in sorted order according to the | ||
* duplicate keys. | ||
* See the [Map documentation](https://rimbu.org/docs/collections/map) and the [SortedMap API documentation](https://rimbu.org/api/rimbu/ordered/map/SortedMap/interface) | ||
* See the [Map documentation](https://rimbu.org/docs/collections/map) and the [SortedMap API documentation](https://rimbu.org/api/rimbu/sorted/map/SortedMap/interface) | ||
* @note | ||
@@ -380,3 +380,3 @@ * - The `SortedMap` keeps the inserted keys in sorted order according to the | ||
* A mutable `SortedMap` builder used to efficiently create new immutable instances. | ||
* See the [Map documentation](https://rimbu.org/docs/collections/map) and the [SortedMap.Builder API documentation](https://rimbu.org/api/rimbu/ordered/map/SortedMap/Builder/interface) | ||
* See the [Map documentation](https://rimbu.org/docs/collections/map) and the [SortedMap.Builder API documentation](https://rimbu.org/api/rimbu/sorted/map/SortedMap/Builder/interface) | ||
* @typeparam K - the key type | ||
@@ -383,0 +383,0 @@ * @typeparam V - the value type |
@@ -13,3 +13,3 @@ import type { RelatedTo } from '@rimbu/common'; | ||
constructor(context: SortedSetContext<T>, source?: SortedSet<T> | undefined, _entries?: T[] | undefined, _children?: SortedSetBuilder<T>[] | undefined, size?: number); | ||
createNew(source?: SortedSet<T>, entries?: T[], children?: SortedSetBuilder<T>[], size?: number): SortedSetBuilder<T>; | ||
createNew(source?: undefined | SortedSet<T>, entries?: undefined | T[], children?: undefined | SortedSetBuilder<T>[], size?: undefined | number): SortedSetBuilder<T>; | ||
prepareMutate(): void; | ||
@@ -16,0 +16,0 @@ get children(): SortedSetBuilder<T>[]; |
{ | ||
"name": "@rimbu/sorted", | ||
"version": "0.9.17", | ||
"version": "0.9.18", | ||
"description": "Immutable SortedMap and SortedSet implementations for TypeScript", | ||
@@ -72,6 +72,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@rimbu/base": "^0.9.4", | ||
"@rimbu/collection-types": "^0.9.17", | ||
"@rimbu/common": "^0.10.2", | ||
"@rimbu/stream": "^0.12.3", | ||
"@rimbu/base": "^0.9.5", | ||
"@rimbu/collection-types": "^0.9.18", | ||
"@rimbu/common": "^0.10.3", | ||
"@rimbu/stream": "^0.12.4", | ||
"tslib": "^2.4.0" | ||
@@ -86,3 +86,3 @@ }, | ||
}, | ||
"gitHead": "0d1677b4df9c1b0f1dc337eb38eea7a99ea7fc43" | ||
"gitHead": "c4009664c4e15f367e963d198cacd7c5fc182a4d" | ||
} |
@@ -666,13 +666,15 @@ import { Arr, RimbuError } from '@rimbu/base'; | ||
abstract get context(): { minEntries: number; maxEntries: number }; | ||
abstract source?: { | ||
min<O>(otherwise?: OptLazy<O>): E | O; | ||
max<O>(otherwise?: OptLazy<O>): E | O; | ||
getAtIndex<O>(index: number, otherwise?: OptLazy<O>): E | O; | ||
forEach( | ||
f: (entry: E, index: number, halt: () => void) => void, | ||
state?: TraverseState | ||
): void; | ||
}; | ||
abstract _entries?: E[]; | ||
abstract _children?: SortedBuilder<E>[]; | ||
abstract source?: | ||
| undefined | ||
| { | ||
min<O>(otherwise?: OptLazy<O>): E | O; | ||
max<O>(otherwise?: OptLazy<O>): E | O; | ||
getAtIndex<O>(index: number, otherwise?: OptLazy<O>): E | O; | ||
forEach( | ||
f: (entry: E, index: number, halt: () => void) => void, | ||
state?: TraverseState | ||
): void; | ||
}; | ||
abstract _entries?: undefined | E[]; | ||
abstract _children?: undefined | SortedBuilder<E>[]; | ||
abstract get children(): SortedBuilder<E>[]; | ||
@@ -683,6 +685,6 @@ abstract set children(value: SortedBuilder<E>[]); | ||
abstract createNew( | ||
source?: unknown, | ||
entries?: E[], | ||
children?: SortedBuilder<E>[], | ||
size?: number | ||
source?: undefined | unknown, | ||
entries?: undefined | E[], | ||
children?: undefined | SortedBuilder<E>[], | ||
size?: undefined | number | ||
): SortedBuilder<E>; | ||
@@ -689,0 +691,0 @@ |
@@ -17,5 +17,5 @@ import { Token } from '@rimbu/base'; | ||
readonly context: SortedMapContext<K>, | ||
public source?: SortedMap<K, V>, | ||
public _entries?: (readonly [K, V])[], | ||
public _children?: SortedMapBuilder<K, V>[], | ||
public source?: undefined | SortedMap<K, V>, | ||
public _entries?: undefined | (readonly [K, V])[], | ||
public _children?: undefined | SortedMapBuilder<K, V>[], | ||
public size = source?.size ?? 0 | ||
@@ -27,6 +27,6 @@ ) { | ||
createNew( | ||
source?: SortedMap<K, V>, | ||
_entries?: (readonly [K, V])[], | ||
_children?: SortedMapBuilder<K, V>[], | ||
size?: number | ||
source?: undefined | SortedMap<K, V>, | ||
_entries?: undefined | (readonly [K, V])[], | ||
_children?: undefined | SortedMapBuilder<K, V>[], | ||
size?: undefined | number | ||
): SortedMapBuilder<K, V> { | ||
@@ -33,0 +33,0 @@ return new SortedMapBuilder( |
@@ -13,3 +13,3 @@ import type { RMapBase } from '@rimbu/collection-types/map-custom'; | ||
* duplicate keys. | ||
* See the [Map documentation](https://rimbu.org/docs/collections/map) and the [SortedMap API documentation](https://rimbu.org/api/rimbu/ordered/map/SortedMap/interface) | ||
* See the [Map documentation](https://rimbu.org/docs/collections/map) and the [SortedMap API documentation](https://rimbu.org/api/rimbu/sorted/map/SortedMap/interface) | ||
* @note | ||
@@ -295,3 +295,3 @@ * - The `SortedMap` keeps the inserted keys in sorted order according to the | ||
* duplicate keys. | ||
* See the [Map documentation](https://rimbu.org/docs/collections/map) and the [SortedMap API documentation](https://rimbu.org/api/rimbu/ordered/map/SortedMap/interface) | ||
* See the [Map documentation](https://rimbu.org/docs/collections/map) and the [SortedMap API documentation](https://rimbu.org/api/rimbu/sorted/map/SortedMap/interface) | ||
* @note | ||
@@ -396,3 +396,3 @@ * - The `SortedMap` keeps the inserted keys in sorted order according to the | ||
* A mutable `SortedMap` builder used to efficiently create new immutable instances. | ||
* See the [Map documentation](https://rimbu.org/docs/collections/map) and the [SortedMap.Builder API documentation](https://rimbu.org/api/rimbu/ordered/map/SortedMap/Builder/interface) | ||
* See the [Map documentation](https://rimbu.org/docs/collections/map) and the [SortedMap.Builder API documentation](https://rimbu.org/api/rimbu/sorted/map/SortedMap/Builder/interface) | ||
* @typeparam K - the key type | ||
@@ -399,0 +399,0 @@ * @typeparam V - the value type |
@@ -13,5 +13,5 @@ import type { RelatedTo } from '@rimbu/common'; | ||
readonly context: SortedSetContext<T>, | ||
public source?: SortedSet<T>, | ||
public _entries?: T[], | ||
public _children?: SortedSetBuilder<T>[], | ||
public source?: undefined | SortedSet<T>, | ||
public _entries?: undefined | T[], | ||
public _children?: undefined | SortedSetBuilder<T>[], | ||
public size = source?.size ?? 0 | ||
@@ -23,6 +23,6 @@ ) { | ||
createNew( | ||
source?: SortedSet<T>, | ||
entries?: T[], | ||
children?: SortedSetBuilder<T>[], | ||
size?: number | ||
source?: undefined | SortedSet<T>, | ||
entries?: undefined | T[], | ||
children?: undefined | SortedSetBuilder<T>[], | ||
size?: undefined | number | ||
): SortedSetBuilder<T> { | ||
@@ -29,0 +29,0 @@ return new SortedSetBuilder(this.context, source, entries, children, size); |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
590348
10197
Updated@rimbu/base@^0.9.5
Updated@rimbu/common@^0.10.3
Updated@rimbu/stream@^0.12.4