@itwin/core-bentley 4.0.0-dev.52 → 4.0.0-dev.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/AccessToken.d.ts +10 -10
- package/lib/cjs/AccessToken.d.ts.map +1 -1
- package/lib/cjs/AccessToken.js +9 -9
- package/lib/cjs/Assert.d.ts +25 -25
- package/lib/cjs/Assert.js +45 -45
- package/lib/cjs/BeEvent.d.ts +81 -81
- package/lib/cjs/BeEvent.d.ts.map +1 -1
- package/lib/cjs/BeEvent.js +156 -156
- package/lib/cjs/BeSQLite.d.ts +172 -172
- package/lib/cjs/BeSQLite.js +185 -185
- package/lib/cjs/BentleyError.d.ts +378 -378
- package/lib/cjs/BentleyError.d.ts.map +1 -1
- package/lib/cjs/BentleyError.js +703 -703
- package/lib/cjs/BentleyLoggerCategory.d.ts +11 -11
- package/lib/cjs/BentleyLoggerCategory.js +19 -19
- package/lib/cjs/ByteStream.d.ts +110 -110
- package/lib/cjs/ByteStream.js +159 -159
- package/lib/cjs/ClassUtils.d.ts +14 -14
- package/lib/cjs/ClassUtils.js +27 -27
- package/lib/cjs/Compare.d.ts +47 -47
- package/lib/cjs/Compare.d.ts.map +1 -1
- package/lib/cjs/Compare.js +75 -75
- package/lib/cjs/CompressedId64Set.d.ts +134 -134
- package/lib/cjs/CompressedId64Set.d.ts.map +1 -1
- package/lib/cjs/CompressedId64Set.js +428 -428
- package/lib/cjs/CompressedId64Set.js.map +1 -1
- package/lib/cjs/Dictionary.d.ts +125 -125
- package/lib/cjs/Dictionary.js +203 -203
- package/lib/cjs/Disposable.d.ts +80 -80
- package/lib/cjs/Disposable.d.ts.map +1 -1
- package/lib/cjs/Disposable.js +120 -120
- package/lib/cjs/Id.d.ts +285 -285
- package/lib/cjs/Id.d.ts.map +1 -1
- package/lib/cjs/Id.js +643 -643
- package/lib/cjs/IndexMap.d.ts +65 -65
- package/lib/cjs/IndexMap.js +91 -91
- package/lib/cjs/JsonSchema.d.ts +77 -77
- package/lib/cjs/JsonSchema.d.ts.map +1 -1
- package/lib/cjs/JsonSchema.js +9 -9
- package/lib/cjs/JsonUtils.d.ts +78 -78
- package/lib/cjs/JsonUtils.js +151 -151
- package/lib/cjs/LRUMap.d.ts +129 -129
- package/lib/cjs/LRUMap.js +333 -333
- package/lib/cjs/LRUMap.js.map +1 -1
- package/lib/cjs/Logger.d.ts +143 -143
- package/lib/cjs/Logger.d.ts.map +1 -1
- package/lib/cjs/Logger.js +256 -256
- package/lib/cjs/Logger.js.map +1 -1
- package/lib/cjs/ObservableSet.d.ts +23 -23
- package/lib/cjs/ObservableSet.js +51 -51
- package/lib/cjs/OneAtATimeAction.d.ts +31 -31
- package/lib/cjs/OneAtATimeAction.js +94 -94
- package/lib/cjs/OrderedId64Iterable.d.ts +74 -74
- package/lib/cjs/OrderedId64Iterable.d.ts.map +1 -1
- package/lib/cjs/OrderedId64Iterable.js +235 -235
- package/lib/cjs/OrderedSet.d.ts +40 -40
- package/lib/cjs/OrderedSet.js +64 -64
- package/lib/cjs/PriorityQueue.d.ts +70 -70
- package/lib/cjs/PriorityQueue.d.ts.map +1 -1
- package/lib/cjs/PriorityQueue.js +140 -140
- package/lib/cjs/ProcessDetector.d.ts +59 -59
- package/lib/cjs/ProcessDetector.js +71 -71
- package/lib/cjs/SortedArray.d.ts +236 -236
- package/lib/cjs/SortedArray.d.ts.map +1 -1
- package/lib/cjs/SortedArray.js +315 -315
- package/lib/cjs/StatusCategory.d.ts +30 -30
- package/lib/cjs/StatusCategory.d.ts.map +1 -1
- package/lib/cjs/StatusCategory.js +460 -460
- package/lib/cjs/StatusCategory.js.map +1 -1
- package/lib/cjs/StringUtils.d.ts +22 -22
- package/lib/cjs/StringUtils.js +148 -148
- package/lib/cjs/Time.d.ts +122 -122
- package/lib/cjs/Time.js +152 -152
- package/lib/cjs/Time.js.map +1 -1
- package/lib/cjs/Tracing.d.ts +40 -40
- package/lib/cjs/Tracing.js +127 -127
- package/lib/cjs/TupleKeyedMap.d.ts +36 -36
- package/lib/cjs/TupleKeyedMap.js +102 -102
- package/lib/cjs/TypedArrayBuilder.d.ts +155 -155
- package/lib/cjs/TypedArrayBuilder.d.ts.map +1 -1
- package/lib/cjs/TypedArrayBuilder.js +206 -206
- package/lib/cjs/UnexpectedErrors.d.ts +43 -43
- package/lib/cjs/UnexpectedErrors.d.ts.map +1 -1
- package/lib/cjs/UnexpectedErrors.js +68 -68
- package/lib/cjs/UnexpectedErrors.js.map +1 -1
- package/lib/cjs/UtilityTypes.d.ts +112 -112
- package/lib/cjs/UtilityTypes.d.ts.map +1 -1
- package/lib/cjs/UtilityTypes.js +40 -40
- package/lib/cjs/YieldManager.d.ts +18 -18
- package/lib/cjs/YieldManager.js +34 -34
- package/lib/cjs/core-bentley.d.ts +74 -74
- package/lib/cjs/core-bentley.js +94 -90
- package/lib/cjs/core-bentley.js.map +1 -1
- package/lib/cjs/partitionArray.d.ts +21 -21
- package/lib/cjs/partitionArray.js +43 -43
- package/lib/esm/AccessToken.d.ts +10 -10
- package/lib/esm/AccessToken.d.ts.map +1 -1
- package/lib/esm/AccessToken.js +8 -8
- package/lib/esm/Assert.d.ts +25 -25
- package/lib/esm/Assert.js +41 -41
- package/lib/esm/BeEvent.d.ts +81 -81
- package/lib/esm/BeEvent.d.ts.map +1 -1
- package/lib/esm/BeEvent.js +150 -150
- package/lib/esm/BeSQLite.d.ts +172 -172
- package/lib/esm/BeSQLite.js +182 -182
- package/lib/esm/BentleyError.d.ts +378 -378
- package/lib/esm/BentleyError.d.ts.map +1 -1
- package/lib/esm/BentleyError.js +699 -699
- package/lib/esm/BentleyLoggerCategory.d.ts +11 -11
- package/lib/esm/BentleyLoggerCategory.js +16 -16
- package/lib/esm/ByteStream.d.ts +110 -110
- package/lib/esm/ByteStream.js +155 -155
- package/lib/esm/ClassUtils.d.ts +14 -14
- package/lib/esm/ClassUtils.js +22 -22
- package/lib/esm/Compare.d.ts +47 -47
- package/lib/esm/Compare.d.ts.map +1 -1
- package/lib/esm/Compare.js +63 -63
- package/lib/esm/CompressedId64Set.d.ts +134 -134
- package/lib/esm/CompressedId64Set.d.ts.map +1 -1
- package/lib/esm/CompressedId64Set.js +423 -423
- package/lib/esm/CompressedId64Set.js.map +1 -1
- package/lib/esm/Dictionary.d.ts +125 -125
- package/lib/esm/Dictionary.js +199 -199
- package/lib/esm/Disposable.d.ts +80 -80
- package/lib/esm/Disposable.d.ts.map +1 -1
- package/lib/esm/Disposable.js +112 -112
- package/lib/esm/Id.d.ts +285 -285
- package/lib/esm/Id.d.ts.map +1 -1
- package/lib/esm/Id.js +639 -639
- package/lib/esm/IndexMap.d.ts +65 -65
- package/lib/esm/IndexMap.js +86 -86
- package/lib/esm/JsonSchema.d.ts +77 -77
- package/lib/esm/JsonSchema.d.ts.map +1 -1
- package/lib/esm/JsonSchema.js +8 -8
- package/lib/esm/JsonUtils.d.ts +78 -78
- package/lib/esm/JsonUtils.js +148 -148
- package/lib/esm/LRUMap.d.ts +129 -129
- package/lib/esm/LRUMap.js +326 -326
- package/lib/esm/LRUMap.js.map +1 -1
- package/lib/esm/Logger.d.ts +143 -143
- package/lib/esm/Logger.d.ts.map +1 -1
- package/lib/esm/Logger.js +253 -251
- package/lib/esm/Logger.js.map +1 -1
- package/lib/esm/ObservableSet.d.ts +23 -23
- package/lib/esm/ObservableSet.js +47 -47
- package/lib/esm/OneAtATimeAction.d.ts +31 -31
- package/lib/esm/OneAtATimeAction.js +89 -89
- package/lib/esm/OrderedId64Iterable.d.ts +74 -74
- package/lib/esm/OrderedId64Iterable.d.ts.map +1 -1
- package/lib/esm/OrderedId64Iterable.js +232 -232
- package/lib/esm/OrderedSet.d.ts +40 -40
- package/lib/esm/OrderedSet.js +59 -59
- package/lib/esm/PriorityQueue.d.ts +70 -70
- package/lib/esm/PriorityQueue.d.ts.map +1 -1
- package/lib/esm/PriorityQueue.js +136 -136
- package/lib/esm/ProcessDetector.d.ts +59 -59
- package/lib/esm/ProcessDetector.js +67 -67
- package/lib/esm/SortedArray.d.ts +236 -236
- package/lib/esm/SortedArray.d.ts.map +1 -1
- package/lib/esm/SortedArray.js +308 -308
- package/lib/esm/StatusCategory.d.ts +30 -30
- package/lib/esm/StatusCategory.d.ts.map +1 -1
- package/lib/esm/StatusCategory.js +455 -454
- package/lib/esm/StatusCategory.js.map +1 -1
- package/lib/esm/StringUtils.d.ts +22 -22
- package/lib/esm/StringUtils.js +142 -142
- package/lib/esm/Time.d.ts +122 -122
- package/lib/esm/Time.js +146 -146
- package/lib/esm/Time.js.map +1 -1
- package/lib/esm/Tracing.d.ts +40 -40
- package/lib/esm/Tracing.js +123 -123
- package/lib/esm/TupleKeyedMap.d.ts +36 -36
- package/lib/esm/TupleKeyedMap.js +98 -98
- package/lib/esm/TypedArrayBuilder.d.ts +155 -155
- package/lib/esm/TypedArrayBuilder.d.ts.map +1 -1
- package/lib/esm/TypedArrayBuilder.js +198 -198
- package/lib/esm/UnexpectedErrors.d.ts +43 -43
- package/lib/esm/UnexpectedErrors.d.ts.map +1 -1
- package/lib/esm/UnexpectedErrors.js +65 -64
- package/lib/esm/UnexpectedErrors.js.map +1 -1
- package/lib/esm/UtilityTypes.d.ts +112 -112
- package/lib/esm/UtilityTypes.d.ts.map +1 -1
- package/lib/esm/UtilityTypes.js +34 -34
- package/lib/esm/YieldManager.d.ts +18 -18
- package/lib/esm/YieldManager.js +30 -30
- package/lib/esm/core-bentley.d.ts +74 -74
- package/lib/esm/core-bentley.js +78 -78
- package/lib/esm/partitionArray.d.ts +21 -21
- package/lib/esm/partitionArray.js +39 -39
- package/package.json +4 -4
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Collections
|
|
3
|
-
*/
|
|
4
|
-
import { BeEvent } from "./BeEvent";
|
|
5
|
-
/** A standard [Set<T>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) that emits events when its contents change.
|
|
6
|
-
* @public
|
|
7
|
-
*/
|
|
8
|
-
export declare class ObservableSet<T> extends Set<T> {
|
|
9
|
-
/** Emitted after `item` is added to this set. */
|
|
10
|
-
readonly onAdded: BeEvent<(item: T) => void>;
|
|
11
|
-
/** Emitted after `item` is deleted from this set. */
|
|
12
|
-
readonly onDeleted: BeEvent<(item: T) => void>;
|
|
13
|
-
/** Emitted after this set's contents are cleared. */
|
|
14
|
-
readonly onCleared: BeEvent<() => void>;
|
|
15
|
-
/** Construct a new ObservableSet.
|
|
16
|
-
* @param elements Optional elements with which to populate the new set.
|
|
17
|
-
*/
|
|
18
|
-
constructor(elements?: Iterable<T> | undefined);
|
|
19
|
-
/** @internal */
|
|
20
|
-
delete(item: T): boolean;
|
|
21
|
-
/** @internal */
|
|
22
|
-
clear(): void;
|
|
23
|
-
}
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Collections
|
|
3
|
+
*/
|
|
4
|
+
import { BeEvent } from "./BeEvent";
|
|
5
|
+
/** A standard [Set<T>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) that emits events when its contents change.
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export declare class ObservableSet<T> extends Set<T> {
|
|
9
|
+
/** Emitted after `item` is added to this set. */
|
|
10
|
+
readonly onAdded: BeEvent<(item: T) => void>;
|
|
11
|
+
/** Emitted after `item` is deleted from this set. */
|
|
12
|
+
readonly onDeleted: BeEvent<(item: T) => void>;
|
|
13
|
+
/** Emitted after this set's contents are cleared. */
|
|
14
|
+
readonly onCleared: BeEvent<() => void>;
|
|
15
|
+
/** Construct a new ObservableSet.
|
|
16
|
+
* @param elements Optional elements with which to populate the new set.
|
|
17
|
+
*/
|
|
18
|
+
constructor(elements?: Iterable<T> | undefined);
|
|
19
|
+
/** @internal */
|
|
20
|
+
delete(item: T): boolean;
|
|
21
|
+
/** @internal */
|
|
22
|
+
clear(): void;
|
|
23
|
+
}
|
|
24
24
|
//# sourceMappingURL=ObservableSet.d.ts.map
|
package/lib/esm/ObservableSet.js
CHANGED
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module Collections
|
|
7
|
-
*/
|
|
8
|
-
import { BeEvent } from "./BeEvent";
|
|
9
|
-
/** A standard [Set<T>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) that emits events when its contents change.
|
|
10
|
-
* @public
|
|
11
|
-
*/
|
|
12
|
-
export class ObservableSet extends Set {
|
|
13
|
-
/** Construct a new ObservableSet.
|
|
14
|
-
* @param elements Optional elements with which to populate the new set.
|
|
15
|
-
*/
|
|
16
|
-
constructor(elements) {
|
|
17
|
-
// NB: Set constructor will invoke add(). Do not override until initialized.
|
|
18
|
-
super(elements);
|
|
19
|
-
/** Emitted after `item` is added to this set. */
|
|
20
|
-
this.onAdded = new BeEvent();
|
|
21
|
-
/** Emitted after `item` is deleted from this set. */
|
|
22
|
-
this.onDeleted = new BeEvent();
|
|
23
|
-
/** Emitted after this set's contents are cleared. */
|
|
24
|
-
this.onCleared = new BeEvent();
|
|
25
|
-
this.add = (item) => {
|
|
26
|
-
const prevSize = this.size;
|
|
27
|
-
const ret = super.add(item);
|
|
28
|
-
if (this.size !== prevSize)
|
|
29
|
-
this.onAdded.raiseEvent(item);
|
|
30
|
-
return ret;
|
|
31
|
-
};
|
|
32
|
-
}
|
|
33
|
-
/** @internal */
|
|
34
|
-
delete(item) {
|
|
35
|
-
const ret = super.delete(item);
|
|
36
|
-
if (ret)
|
|
37
|
-
this.onDeleted.raiseEvent(item);
|
|
38
|
-
return ret;
|
|
39
|
-
}
|
|
40
|
-
/** @internal */
|
|
41
|
-
clear() {
|
|
42
|
-
if (0 !== this.size) {
|
|
43
|
-
super.clear();
|
|
44
|
-
this.onCleared.raiseEvent();
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Collections
|
|
7
|
+
*/
|
|
8
|
+
import { BeEvent } from "./BeEvent";
|
|
9
|
+
/** A standard [Set<T>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set) that emits events when its contents change.
|
|
10
|
+
* @public
|
|
11
|
+
*/
|
|
12
|
+
export class ObservableSet extends Set {
|
|
13
|
+
/** Construct a new ObservableSet.
|
|
14
|
+
* @param elements Optional elements with which to populate the new set.
|
|
15
|
+
*/
|
|
16
|
+
constructor(elements) {
|
|
17
|
+
// NB: Set constructor will invoke add(). Do not override until initialized.
|
|
18
|
+
super(elements);
|
|
19
|
+
/** Emitted after `item` is added to this set. */
|
|
20
|
+
this.onAdded = new BeEvent();
|
|
21
|
+
/** Emitted after `item` is deleted from this set. */
|
|
22
|
+
this.onDeleted = new BeEvent();
|
|
23
|
+
/** Emitted after this set's contents are cleared. */
|
|
24
|
+
this.onCleared = new BeEvent();
|
|
25
|
+
this.add = (item) => {
|
|
26
|
+
const prevSize = this.size;
|
|
27
|
+
const ret = super.add(item);
|
|
28
|
+
if (this.size !== prevSize)
|
|
29
|
+
this.onAdded.raiseEvent(item);
|
|
30
|
+
return ret;
|
|
31
|
+
};
|
|
32
|
+
}
|
|
33
|
+
/** @internal */
|
|
34
|
+
delete(item) {
|
|
35
|
+
const ret = super.delete(item);
|
|
36
|
+
if (ret)
|
|
37
|
+
this.onDeleted.raiseEvent(item);
|
|
38
|
+
return ret;
|
|
39
|
+
}
|
|
40
|
+
/** @internal */
|
|
41
|
+
clear() {
|
|
42
|
+
if (0 !== this.size) {
|
|
43
|
+
super.clear();
|
|
44
|
+
this.onCleared.raiseEvent();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
48
|
//# sourceMappingURL=ObservableSet.js.map
|
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Utils
|
|
3
|
-
*/
|
|
4
|
-
/** @beta */
|
|
5
|
-
export declare class AbandonedError extends Error {
|
|
6
|
-
}
|
|
7
|
-
/**
|
|
8
|
-
* Orchestrator of a one-at-a-time activity. This concept is useful only for *replaceable* operations (that is, operations where subsequent requests replace and obviate
|
|
9
|
-
* the need for previous requests. E.g. over slow HTTP connections, without this class, the stream of requests can overwhelm the connection, and cause the HTTP
|
|
10
|
-
* request queue to grow such that the delay to service new requests is unbounded.
|
|
11
|
-
*
|
|
12
|
-
* With this class, we issue the initial request immediately. When the second request arrives before the first one completes, it becomes *pending*. If subsequent
|
|
13
|
-
* requests arrive with a pending request, the current pending request is *abandoned* (its Promise is rejected) and the new request becomes pending.
|
|
14
|
-
* When the active request completes, the pending request (if present) is started. In this manner there will only ever be one outstanding HTTP request for this type
|
|
15
|
-
* of operation, but the first and last request will always eventually complete.
|
|
16
|
-
* @beta
|
|
17
|
-
*/
|
|
18
|
-
export declare class OneAtATimeAction<T> {
|
|
19
|
-
private _active?;
|
|
20
|
-
private _pending?;
|
|
21
|
-
private _run;
|
|
22
|
-
msg: string;
|
|
23
|
-
/** Ctor for OneAtATimePromise.
|
|
24
|
-
* @param run The method that performs an action that creates the Promise.
|
|
25
|
-
*/
|
|
26
|
-
constructor(run: (...args: any[]) => Promise<T>, msg?: string);
|
|
27
|
-
/** Add a new request to this OneAtATimePromise. The request will only run when no other outstanding requests are active.
|
|
28
|
-
* @note Callers of this method *must* handle AbandonedError rejections.
|
|
29
|
-
*/
|
|
30
|
-
request(...args: any[]): Promise<T>;
|
|
31
|
-
}
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Utils
|
|
3
|
+
*/
|
|
4
|
+
/** @beta */
|
|
5
|
+
export declare class AbandonedError extends Error {
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Orchestrator of a one-at-a-time activity. This concept is useful only for *replaceable* operations (that is, operations where subsequent requests replace and obviate
|
|
9
|
+
* the need for previous requests. E.g. over slow HTTP connections, without this class, the stream of requests can overwhelm the connection, and cause the HTTP
|
|
10
|
+
* request queue to grow such that the delay to service new requests is unbounded.
|
|
11
|
+
*
|
|
12
|
+
* With this class, we issue the initial request immediately. When the second request arrives before the first one completes, it becomes *pending*. If subsequent
|
|
13
|
+
* requests arrive with a pending request, the current pending request is *abandoned* (its Promise is rejected) and the new request becomes pending.
|
|
14
|
+
* When the active request completes, the pending request (if present) is started. In this manner there will only ever be one outstanding HTTP request for this type
|
|
15
|
+
* of operation, but the first and last request will always eventually complete.
|
|
16
|
+
* @beta
|
|
17
|
+
*/
|
|
18
|
+
export declare class OneAtATimeAction<T> {
|
|
19
|
+
private _active?;
|
|
20
|
+
private _pending?;
|
|
21
|
+
private _run;
|
|
22
|
+
msg: string;
|
|
23
|
+
/** Ctor for OneAtATimePromise.
|
|
24
|
+
* @param run The method that performs an action that creates the Promise.
|
|
25
|
+
*/
|
|
26
|
+
constructor(run: (...args: any[]) => Promise<T>, msg?: string);
|
|
27
|
+
/** Add a new request to this OneAtATimePromise. The request will only run when no other outstanding requests are active.
|
|
28
|
+
* @note Callers of this method *must* handle AbandonedError rejections.
|
|
29
|
+
*/
|
|
30
|
+
request(...args: any[]): Promise<T>;
|
|
31
|
+
}
|
|
32
32
|
//# sourceMappingURL=OneAtATimeAction.d.ts.map
|
|
@@ -1,90 +1,90 @@
|
|
|
1
|
-
/*---------------------------------------------------------------------------------------------
|
|
2
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
-
*--------------------------------------------------------------------------------------------*/
|
|
5
|
-
/** @packageDocumentation
|
|
6
|
-
* @module Utils
|
|
7
|
-
*/
|
|
8
|
-
import { BentleyError } from "./BentleyError";
|
|
9
|
-
/** @beta */
|
|
10
|
-
export class AbandonedError extends Error {
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* An object that returns a Promise when you call [[init]], but supplies a way to abandon the promise if it is no longer relevant.
|
|
14
|
-
* When you call abandon, the promise will be rejected. You must supply a [[run]] method to the constructor that
|
|
15
|
-
* creates the real Promise for the underlying action. Notice that to use this class there are really two
|
|
16
|
-
* Promises involved that are chained together. That makes this class less efficient than just using a Promise directly.
|
|
17
|
-
*/
|
|
18
|
-
class PromiseWithAbandon {
|
|
19
|
-
/** Create a PromiseWithAbandon. After this call you must call [[init]] to create the underlying Promise.
|
|
20
|
-
* @param _run The method that creates the underlying Promise.
|
|
21
|
-
* @param _args An array of args to be passed to run when [[start]] is called.
|
|
22
|
-
*/
|
|
23
|
-
constructor(_run, _args) {
|
|
24
|
-
this._run = _run;
|
|
25
|
-
this._args = _args;
|
|
26
|
-
}
|
|
27
|
-
/** Create a Promise that is chained to the underlying Promise, but is connected to the abandon method. */
|
|
28
|
-
async init(msg) {
|
|
29
|
-
return new Promise((resolve, reject) => {
|
|
30
|
-
this.abandon = (message) => reject(new AbandonedError(message ?? msg));
|
|
31
|
-
this._resolve = resolve;
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
/** Call the [[run]] method supplied to the ctor to start the underlying Promise. */
|
|
35
|
-
async start() {
|
|
36
|
-
try {
|
|
37
|
-
this._resolve(await this._run(...this._args));
|
|
38
|
-
}
|
|
39
|
-
catch (err) {
|
|
40
|
-
this.abandon(BentleyError.getErrorMessage(err)); // turn all errors from execution into abandoned errors, but keep the message
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Orchestrator of a one-at-a-time activity. This concept is useful only for *replaceable* operations (that is, operations where subsequent requests replace and obviate
|
|
46
|
-
* the need for previous requests. E.g. over slow HTTP connections, without this class, the stream of requests can overwhelm the connection, and cause the HTTP
|
|
47
|
-
* request queue to grow such that the delay to service new requests is unbounded.
|
|
48
|
-
*
|
|
49
|
-
* With this class, we issue the initial request immediately. When the second request arrives before the first one completes, it becomes *pending*. If subsequent
|
|
50
|
-
* requests arrive with a pending request, the current pending request is *abandoned* (its Promise is rejected) and the new request becomes pending.
|
|
51
|
-
* When the active request completes, the pending request (if present) is started. In this manner there will only ever be one outstanding HTTP request for this type
|
|
52
|
-
* of operation, but the first and last request will always eventually complete.
|
|
53
|
-
* @beta
|
|
54
|
-
*/
|
|
55
|
-
export class OneAtATimeAction {
|
|
56
|
-
/** Ctor for OneAtATimePromise.
|
|
57
|
-
* @param run The method that performs an action that creates the Promise.
|
|
58
|
-
*/
|
|
59
|
-
constructor(run, msg = "abandoned") {
|
|
60
|
-
this._run = run;
|
|
61
|
-
this.msg = msg;
|
|
62
|
-
}
|
|
63
|
-
/** Add a new request to this OneAtATimePromise. The request will only run when no other outstanding requests are active.
|
|
64
|
-
* @note Callers of this method *must* handle AbandonedError rejections.
|
|
65
|
-
*/
|
|
66
|
-
async request(...args) {
|
|
67
|
-
const entry = new PromiseWithAbandon(this._run, args); // create an "abandon-able promise" object
|
|
68
|
-
const promise = entry.init(this.msg); // create the Promise from PromiseWithAbandon. Note: this must be called before we call start.
|
|
69
|
-
if (this._active !== undefined) { // is there an active request?
|
|
70
|
-
if (this._pending) // yes. If there is also a pending request, this one replaces it and previous one is abandoned
|
|
71
|
-
this._pending.abandon(); // rejects previous call to this method, throwing AbandonedError.
|
|
72
|
-
this._pending = entry;
|
|
73
|
-
}
|
|
74
|
-
else {
|
|
75
|
-
this._active = entry; // this is the first request, start it.
|
|
76
|
-
entry.start(); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
77
|
-
}
|
|
78
|
-
try {
|
|
79
|
-
return await promise;
|
|
80
|
-
}
|
|
81
|
-
finally {
|
|
82
|
-
// do all of this whether promise was fulfilled or rejected
|
|
83
|
-
this._active = this._pending; // see if there's a pending request waiting
|
|
84
|
-
this._pending = undefined; // clear pending
|
|
85
|
-
if (this._active)
|
|
86
|
-
this._active.start(); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
1
|
+
/*---------------------------------------------------------------------------------------------
|
|
2
|
+
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
|
3
|
+
* See LICENSE.md in the project root for license terms and full copyright notice.
|
|
4
|
+
*--------------------------------------------------------------------------------------------*/
|
|
5
|
+
/** @packageDocumentation
|
|
6
|
+
* @module Utils
|
|
7
|
+
*/
|
|
8
|
+
import { BentleyError } from "./BentleyError";
|
|
9
|
+
/** @beta */
|
|
10
|
+
export class AbandonedError extends Error {
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* An object that returns a Promise when you call [[init]], but supplies a way to abandon the promise if it is no longer relevant.
|
|
14
|
+
* When you call abandon, the promise will be rejected. You must supply a [[run]] method to the constructor that
|
|
15
|
+
* creates the real Promise for the underlying action. Notice that to use this class there are really two
|
|
16
|
+
* Promises involved that are chained together. That makes this class less efficient than just using a Promise directly.
|
|
17
|
+
*/
|
|
18
|
+
class PromiseWithAbandon {
|
|
19
|
+
/** Create a PromiseWithAbandon. After this call you must call [[init]] to create the underlying Promise.
|
|
20
|
+
* @param _run The method that creates the underlying Promise.
|
|
21
|
+
* @param _args An array of args to be passed to run when [[start]] is called.
|
|
22
|
+
*/
|
|
23
|
+
constructor(_run, _args) {
|
|
24
|
+
this._run = _run;
|
|
25
|
+
this._args = _args;
|
|
26
|
+
}
|
|
27
|
+
/** Create a Promise that is chained to the underlying Promise, but is connected to the abandon method. */
|
|
28
|
+
async init(msg) {
|
|
29
|
+
return new Promise((resolve, reject) => {
|
|
30
|
+
this.abandon = (message) => reject(new AbandonedError(message ?? msg));
|
|
31
|
+
this._resolve = resolve;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/** Call the [[run]] method supplied to the ctor to start the underlying Promise. */
|
|
35
|
+
async start() {
|
|
36
|
+
try {
|
|
37
|
+
this._resolve(await this._run(...this._args));
|
|
38
|
+
}
|
|
39
|
+
catch (err) {
|
|
40
|
+
this.abandon(BentleyError.getErrorMessage(err)); // turn all errors from execution into abandoned errors, but keep the message
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Orchestrator of a one-at-a-time activity. This concept is useful only for *replaceable* operations (that is, operations where subsequent requests replace and obviate
|
|
46
|
+
* the need for previous requests. E.g. over slow HTTP connections, without this class, the stream of requests can overwhelm the connection, and cause the HTTP
|
|
47
|
+
* request queue to grow such that the delay to service new requests is unbounded.
|
|
48
|
+
*
|
|
49
|
+
* With this class, we issue the initial request immediately. When the second request arrives before the first one completes, it becomes *pending*. If subsequent
|
|
50
|
+
* requests arrive with a pending request, the current pending request is *abandoned* (its Promise is rejected) and the new request becomes pending.
|
|
51
|
+
* When the active request completes, the pending request (if present) is started. In this manner there will only ever be one outstanding HTTP request for this type
|
|
52
|
+
* of operation, but the first and last request will always eventually complete.
|
|
53
|
+
* @beta
|
|
54
|
+
*/
|
|
55
|
+
export class OneAtATimeAction {
|
|
56
|
+
/** Ctor for OneAtATimePromise.
|
|
57
|
+
* @param run The method that performs an action that creates the Promise.
|
|
58
|
+
*/
|
|
59
|
+
constructor(run, msg = "abandoned") {
|
|
60
|
+
this._run = run;
|
|
61
|
+
this.msg = msg;
|
|
62
|
+
}
|
|
63
|
+
/** Add a new request to this OneAtATimePromise. The request will only run when no other outstanding requests are active.
|
|
64
|
+
* @note Callers of this method *must* handle AbandonedError rejections.
|
|
65
|
+
*/
|
|
66
|
+
async request(...args) {
|
|
67
|
+
const entry = new PromiseWithAbandon(this._run, args); // create an "abandon-able promise" object
|
|
68
|
+
const promise = entry.init(this.msg); // create the Promise from PromiseWithAbandon. Note: this must be called before we call start.
|
|
69
|
+
if (this._active !== undefined) { // is there an active request?
|
|
70
|
+
if (this._pending) // yes. If there is also a pending request, this one replaces it and previous one is abandoned
|
|
71
|
+
this._pending.abandon(); // rejects previous call to this method, throwing AbandonedError.
|
|
72
|
+
this._pending = entry;
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
this._active = entry; // this is the first request, start it.
|
|
76
|
+
entry.start(); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
77
|
+
}
|
|
78
|
+
try {
|
|
79
|
+
return await promise;
|
|
80
|
+
}
|
|
81
|
+
finally {
|
|
82
|
+
// do all of this whether promise was fulfilled or rejected
|
|
83
|
+
this._active = this._pending; // see if there's a pending request waiting
|
|
84
|
+
this._pending = undefined; // clear pending
|
|
85
|
+
if (this._active)
|
|
86
|
+
this._active.start(); // eslint-disable-line @typescript-eslint/no-floating-promises
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
90
|
//# sourceMappingURL=OneAtATimeAction.js.map
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
/** @packageDocumentation
|
|
2
|
-
* @module Ids
|
|
3
|
-
*/
|
|
4
|
-
import { CompressedId64Set } from "./CompressedId64Set";
|
|
5
|
-
import { Id64Array, Id64String } from "./Id";
|
|
6
|
-
/** @public */
|
|
7
|
-
export
|
|
8
|
-
/** A collection of **valid** [[Id64String]]s sorted in ascending order by the unsigned 64-bit integer value of the Ids.
|
|
9
|
-
* This ordering is a requirement for several groups of APIs including [[CompressedId64Set]].
|
|
10
|
-
* When used as input to a function, duplicate Ids are ignored; when returned as a function output, no duplicates are present.
|
|
11
|
-
* @see [[CompressedId64Set]] for a compact string representation of such an ordered collection.
|
|
12
|
-
* @see [[OrderedId64Iterable.compare]] for a function that compares Ids based on this criterion.
|
|
13
|
-
* @see [[OrderedId64Array]] for a mutable implementation.
|
|
14
|
-
* @public
|
|
15
|
-
*/
|
|
16
|
-
export declare namespace OrderedId64Iterable {
|
|
17
|
-
/** An ordered comparison of [[Id64String]]s suitable for use with sorting routines like
|
|
18
|
-
* [Array.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) and sorted containers
|
|
19
|
-
* like [[SortedArray]] and [[Dictionary]]. The comparison compares the 64-bit numerical values of the two Ids, returning a negative number if lhs < rhs,
|
|
20
|
-
* a positive number if lhs > rhs, or zero if lhs == rhs.
|
|
21
|
-
* The default string comparison is fine (and more efficient) when numerical ordering is not required; use this instead if you want e.g., "0x100" to be greater than "0xf".
|
|
22
|
-
* @see [[OrderedId64Iterable.sortArray]] for a convenient way to sort an array of Id64Strings.
|
|
23
|
-
*/
|
|
24
|
-
function compare(lhs: Id64String, rhs: Id64String): number;
|
|
25
|
-
/** Sort an array of [[Id64String]]s **in-place** in ascending order by their 64-bit numerical values.
|
|
26
|
-
* @see [[OrderedId64Iterable.compare]] for the comparison routine used.
|
|
27
|
-
* @returns the input array.
|
|
28
|
-
* @note This function returns its input for consistency with Javascript's
|
|
29
|
-
* [Array.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) method.
|
|
30
|
-
* It **does not** create a **new** array.
|
|
31
|
-
*/
|
|
32
|
-
function sortArray(ids: Id64Array): Id64Array;
|
|
33
|
-
/** Given two ordered collections of [[Id64String]]s, determine whether they are identical sets. Duplicate Ids are ignored.
|
|
34
|
-
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
35
|
-
*/
|
|
36
|
-
function areEqualSets(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): boolean;
|
|
37
|
-
/** Given an ordered collection of [[Id64String]]s, determine if it contains any Ids.
|
|
38
|
-
* @param ids A well-formed, ordered collection of zero or more valid Ids.
|
|
39
|
-
* @returns true if the input represents an empty set of Ids. The result is unspecified if the input does not meet the criteria for the input type.
|
|
40
|
-
*/
|
|
41
|
-
function isEmptySet(ids: OrderedId64Iterable | CompressedId64Set): boolean;
|
|
42
|
-
/** Given an ordered collection of [[Id64String]]s possibly containing duplicates, produce an ordered collection containing no duplicates.
|
|
43
|
-
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
44
|
-
*/
|
|
45
|
-
function unique(ids: OrderedId64Iterable): OrderedId64Iterable;
|
|
46
|
-
/** Given an ordered collection of [[Id64String]]s possibly containing duplicates, produce an ordered iterator over the distinct Ids, eliminating duplicates.
|
|
47
|
-
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
48
|
-
*/
|
|
49
|
-
function uniqueIterator(ids: OrderedId64Iterable): Generator<string, void, unknown>;
|
|
50
|
-
/** Given two ordered collections of [[Id64String]]s, produce a collection representing their union - i.e., the Ids that are present in either or both collections.
|
|
51
|
-
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
52
|
-
*/
|
|
53
|
-
function union(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): OrderedId64Iterable;
|
|
54
|
-
/** Given two ordered collections of [[Id64String]]s, produce an iterator representing their intersection - i.e., the Ids that are present in both collections.
|
|
55
|
-
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
56
|
-
*/
|
|
57
|
-
function intersection(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): OrderedId64Iterable;
|
|
58
|
-
/** Given two ordered collections of [[Id64String]]s, produce an iterator representing their difference - i.e., the Ids that are present in `ids1` but not present in `ids2`.
|
|
59
|
-
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
60
|
-
*/
|
|
61
|
-
function difference(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): OrderedId64Iterable;
|
|
62
|
-
/** Given two ordered collections of [[Id64String]]s, produce an iterator representing their union - i.e., the Ids that are present in either or both collections.
|
|
63
|
-
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
64
|
-
*/
|
|
65
|
-
function unionIterator(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): Generator<string, void, unknown>;
|
|
66
|
-
/** Given two ordered collections of [[Id64String]]s, produce an iterator representing their intersection - i.e., the Ids that are present in both collections.
|
|
67
|
-
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
68
|
-
*/
|
|
69
|
-
function intersectionIterator(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): Generator<string, void, unknown>;
|
|
70
|
-
/** Given two ordered collections of [[Id64String]]s, produce an iterator representing their difference - i.e., the Ids that are present in `ids1` but not present in `ids2`.
|
|
71
|
-
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
72
|
-
*/
|
|
73
|
-
function differenceIterator(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): Generator<string, void, unknown>;
|
|
74
|
-
}
|
|
1
|
+
/** @packageDocumentation
|
|
2
|
+
* @module Ids
|
|
3
|
+
*/
|
|
4
|
+
import { CompressedId64Set } from "./CompressedId64Set";
|
|
5
|
+
import { Id64Array, Id64String } from "./Id";
|
|
6
|
+
/** @public */
|
|
7
|
+
export type OrderedId64Iterable = Iterable<Id64String>;
|
|
8
|
+
/** A collection of **valid** [[Id64String]]s sorted in ascending order by the unsigned 64-bit integer value of the Ids.
|
|
9
|
+
* This ordering is a requirement for several groups of APIs including [[CompressedId64Set]].
|
|
10
|
+
* When used as input to a function, duplicate Ids are ignored; when returned as a function output, no duplicates are present.
|
|
11
|
+
* @see [[CompressedId64Set]] for a compact string representation of such an ordered collection.
|
|
12
|
+
* @see [[OrderedId64Iterable.compare]] for a function that compares Ids based on this criterion.
|
|
13
|
+
* @see [[OrderedId64Array]] for a mutable implementation.
|
|
14
|
+
* @public
|
|
15
|
+
*/
|
|
16
|
+
export declare namespace OrderedId64Iterable {
|
|
17
|
+
/** An ordered comparison of [[Id64String]]s suitable for use with sorting routines like
|
|
18
|
+
* [Array.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) and sorted containers
|
|
19
|
+
* like [[SortedArray]] and [[Dictionary]]. The comparison compares the 64-bit numerical values of the two Ids, returning a negative number if lhs < rhs,
|
|
20
|
+
* a positive number if lhs > rhs, or zero if lhs == rhs.
|
|
21
|
+
* The default string comparison is fine (and more efficient) when numerical ordering is not required; use this instead if you want e.g., "0x100" to be greater than "0xf".
|
|
22
|
+
* @see [[OrderedId64Iterable.sortArray]] for a convenient way to sort an array of Id64Strings.
|
|
23
|
+
*/
|
|
24
|
+
function compare(lhs: Id64String, rhs: Id64String): number;
|
|
25
|
+
/** Sort an array of [[Id64String]]s **in-place** in ascending order by their 64-bit numerical values.
|
|
26
|
+
* @see [[OrderedId64Iterable.compare]] for the comparison routine used.
|
|
27
|
+
* @returns the input array.
|
|
28
|
+
* @note This function returns its input for consistency with Javascript's
|
|
29
|
+
* [Array.sort](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) method.
|
|
30
|
+
* It **does not** create a **new** array.
|
|
31
|
+
*/
|
|
32
|
+
function sortArray(ids: Id64Array): Id64Array;
|
|
33
|
+
/** Given two ordered collections of [[Id64String]]s, determine whether they are identical sets. Duplicate Ids are ignored.
|
|
34
|
+
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
35
|
+
*/
|
|
36
|
+
function areEqualSets(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): boolean;
|
|
37
|
+
/** Given an ordered collection of [[Id64String]]s, determine if it contains any Ids.
|
|
38
|
+
* @param ids A well-formed, ordered collection of zero or more valid Ids.
|
|
39
|
+
* @returns true if the input represents an empty set of Ids. The result is unspecified if the input does not meet the criteria for the input type.
|
|
40
|
+
*/
|
|
41
|
+
function isEmptySet(ids: OrderedId64Iterable | CompressedId64Set): boolean;
|
|
42
|
+
/** Given an ordered collection of [[Id64String]]s possibly containing duplicates, produce an ordered collection containing no duplicates.
|
|
43
|
+
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
44
|
+
*/
|
|
45
|
+
function unique(ids: OrderedId64Iterable): OrderedId64Iterable;
|
|
46
|
+
/** Given an ordered collection of [[Id64String]]s possibly containing duplicates, produce an ordered iterator over the distinct Ids, eliminating duplicates.
|
|
47
|
+
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
48
|
+
*/
|
|
49
|
+
function uniqueIterator(ids: OrderedId64Iterable): Generator<string, void, unknown>;
|
|
50
|
+
/** Given two ordered collections of [[Id64String]]s, produce a collection representing their union - i.e., the Ids that are present in either or both collections.
|
|
51
|
+
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
52
|
+
*/
|
|
53
|
+
function union(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): OrderedId64Iterable;
|
|
54
|
+
/** Given two ordered collections of [[Id64String]]s, produce an iterator representing their intersection - i.e., the Ids that are present in both collections.
|
|
55
|
+
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
56
|
+
*/
|
|
57
|
+
function intersection(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): OrderedId64Iterable;
|
|
58
|
+
/** Given two ordered collections of [[Id64String]]s, produce an iterator representing their difference - i.e., the Ids that are present in `ids1` but not present in `ids2`.
|
|
59
|
+
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
60
|
+
*/
|
|
61
|
+
function difference(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): OrderedId64Iterable;
|
|
62
|
+
/** Given two ordered collections of [[Id64String]]s, produce an iterator representing their union - i.e., the Ids that are present in either or both collections.
|
|
63
|
+
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
64
|
+
*/
|
|
65
|
+
function unionIterator(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): Generator<string, void, unknown>;
|
|
66
|
+
/** Given two ordered collections of [[Id64String]]s, produce an iterator representing their intersection - i.e., the Ids that are present in both collections.
|
|
67
|
+
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
68
|
+
*/
|
|
69
|
+
function intersectionIterator(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): Generator<string, void, unknown>;
|
|
70
|
+
/** Given two ordered collections of [[Id64String]]s, produce an iterator representing their difference - i.e., the Ids that are present in `ids1` but not present in `ids2`.
|
|
71
|
+
* @note If the inputs are not ordered as required by [[OrderedId64Iterable]], the results are unpredictable.
|
|
72
|
+
*/
|
|
73
|
+
function differenceIterator(ids1: OrderedId64Iterable, ids2: OrderedId64Iterable): Generator<string, void, unknown>;
|
|
74
|
+
}
|
|
75
75
|
//# sourceMappingURL=OrderedId64Iterable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OrderedId64Iterable.d.ts","sourceRoot":"","sources":["../../src/OrderedId64Iterable.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE7C,cAAc;AACd,
|
|
1
|
+
{"version":3,"file":"OrderedId64Iterable.d.ts","sourceRoot":"","sources":["../../src/OrderedId64Iterable.ts"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAE7C,cAAc;AACd,MAAM,MAAM,mBAAmB,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;AAEvD;;;;;;;GAOG;AACH,yBAAiB,mBAAmB,CAAC;IACnC;;;;;;OAMG;IACH,SAAgB,OAAO,CAAC,GAAG,EAAE,UAAU,EAAE,GAAG,EAAE,UAAU,GAAG,MAAM,CAUhE;IAED;;;;;;OAMG;IACH,SAAgB,SAAS,CAAC,GAAG,EAAE,SAAS,GAAG,SAAS,CAGnD;IAED;;OAEG;IACH,SAAgB,YAAY,CAAC,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,mBAAmB,GAAG,OAAO,CAoB1F;IAED;;;OAGG;IACH,SAAgB,UAAU,CAAC,GAAG,EAAE,mBAAmB,GAAG,iBAAiB,GAAG,OAAO,CAKhF;IAED;;OAEG;IACH,SAAgB,MAAM,CAAC,GAAG,EAAE,mBAAmB,GAAG,mBAAmB,CAEpE;IAED;;OAEG;IACH,SAAiB,cAAc,CAAC,GAAG,EAAE,mBAAmB,oCAavD;IAED;;OAEG;IACH,SAAgB,KAAK,CAAC,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,mBAAmB,GAAG,mBAAmB,CAE/F;IAED;;OAEG;IACH,SAAgB,YAAY,CAAC,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,mBAAmB,GAAG,mBAAmB,CAEtG;IAED;;OAEG;IACH,SAAgB,UAAU,CAAC,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,mBAAmB,GAAG,mBAAmB,CAEpG;IAED;;OAEG;IACH,SAAiB,aAAa,CAAC,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,mBAAmB,oCA0ClF;IAED;;OAEG;IACH,SAAiB,oBAAoB,CAAC,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,mBAAmB,oCA6BzF;IAED;;OAEG;IACH,SAAiB,kBAAkB,CAAC,IAAI,EAAE,mBAAmB,EAAE,IAAI,EAAE,mBAAmB,oCAiCvF;CACF"}
|