@fluidframework/core-utils 2.0.0-dev.7.4.0.215747 → 2.0.0-dev.7.4.0.216897

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.
Files changed (67) hide show
  1. package/api-extractor-lint.json +13 -0
  2. package/api-report/core-utils.api.md +19 -19
  3. package/dist/assert.d.ts +1 -1
  4. package/dist/assert.js +1 -1
  5. package/dist/assert.js.map +1 -1
  6. package/dist/core-utils-alpha.d.ts +19 -382
  7. package/dist/core-utils-beta.d.ts +19 -382
  8. package/dist/core-utils-public.d.ts +19 -382
  9. package/dist/core-utils-untrimmed.d.ts +19 -19
  10. package/dist/delay.d.ts +1 -1
  11. package/dist/delay.js +1 -1
  12. package/dist/delay.js.map +1 -1
  13. package/dist/heap.d.ts +4 -4
  14. package/dist/heap.js +2 -2
  15. package/dist/heap.js.map +1 -1
  16. package/dist/lazy.d.ts +2 -2
  17. package/dist/lazy.js +2 -2
  18. package/dist/lazy.js.map +1 -1
  19. package/dist/promiseCache.d.ts +3 -3
  20. package/dist/promiseCache.js +1 -1
  21. package/dist/promiseCache.js.map +1 -1
  22. package/dist/promises.d.ts +1 -1
  23. package/dist/promises.js +1 -1
  24. package/dist/promises.js.map +1 -1
  25. package/dist/timer.d.ts +6 -6
  26. package/dist/timer.js +3 -3
  27. package/dist/timer.js.map +1 -1
  28. package/dist/unreachable.d.ts +1 -1
  29. package/dist/unreachable.js +1 -1
  30. package/dist/unreachable.js.map +1 -1
  31. package/lib/assert.d.ts +1 -1
  32. package/lib/assert.js +1 -1
  33. package/lib/assert.js.map +1 -1
  34. package/lib/core-utils-alpha.d.ts +19 -382
  35. package/lib/core-utils-beta.d.ts +19 -382
  36. package/lib/core-utils-public.d.ts +19 -382
  37. package/lib/core-utils-untrimmed.d.ts +19 -19
  38. package/lib/delay.d.ts +1 -1
  39. package/lib/delay.js +1 -1
  40. package/lib/delay.js.map +1 -1
  41. package/lib/heap.d.ts +4 -4
  42. package/lib/heap.js +2 -2
  43. package/lib/heap.js.map +1 -1
  44. package/lib/lazy.d.ts +2 -2
  45. package/lib/lazy.js +2 -2
  46. package/lib/lazy.js.map +1 -1
  47. package/lib/promiseCache.d.ts +3 -3
  48. package/lib/promiseCache.js +1 -1
  49. package/lib/promiseCache.js.map +1 -1
  50. package/lib/promises.d.ts +1 -1
  51. package/lib/promises.js +1 -1
  52. package/lib/promises.js.map +1 -1
  53. package/lib/timer.d.ts +6 -6
  54. package/lib/timer.js +3 -3
  55. package/lib/timer.js.map +1 -1
  56. package/lib/unreachable.d.ts +1 -1
  57. package/lib/unreachable.js +1 -1
  58. package/lib/unreachable.js.map +1 -1
  59. package/package.json +4 -3
  60. package/src/assert.ts +1 -1
  61. package/src/delay.ts +1 -1
  62. package/src/heap.ts +4 -4
  63. package/src/lazy.ts +2 -2
  64. package/src/promiseCache.ts +3 -3
  65. package/src/promises.ts +1 -1
  66. package/src/timer.ts +6 -6
  67. package/src/unreachable.ts +1 -1
@@ -1,404 +1,41 @@
1
- /**
2
- * A browser friendly assert library.
3
- * Use this instead of the 'assert' package, which has a big impact on bundle sizes.
4
- * @param condition - The condition that should be true, if the condition is false an error will be thrown.
5
- * Only use this API when `false` indicates a logic error in the problem and thus a bug that should be fixed.
6
- * @param message - The message to include in the error when the condition does not hold.
7
- * A number should not be specified manually: use a string.
8
- * Before a release, policy-check should be run, which will convert any asserts still using strings to
9
- * use numbered error codes instead.
10
- * @public
11
- */
12
- export declare function assert(condition: boolean, message: string | number): asserts condition;
1
+ /* Excluded from this release type: assert */
13
2
 
14
3
  /* Excluded from this release type: compareArrays */
15
4
 
16
- /**
17
- * A deferred creates a promise and the ability to resolve or reject it
18
- * @public
19
- */
20
- export declare class Deferred<T> {
21
- private readonly p;
22
- private res;
23
- private rej;
24
- private completed;
25
- constructor();
26
- /**
27
- * Returns whether the underlying promise has been completed
28
- */
29
- get isCompleted(): boolean;
30
- /**
31
- * Retrieves the underlying promise for the deferred
32
- *
33
- * @returns the underlying promise
34
- */
35
- get promise(): Promise<T>;
36
- /**
37
- * Resolves the promise
38
- *
39
- * @param value - the value to resolve the promise with
40
- */
41
- resolve(value: T | PromiseLike<T>): void;
42
- /**
43
- * Rejects the promise
44
- *
45
- * @param value - the value to reject the promise with
46
- */
47
- reject(error: any): void;
48
- }
5
+ /* Excluded from this release type: Deferred */
49
6
 
50
- /**
51
- * Returns a promise that resolves after `timeMs`.
52
- * @param timeMs - Time in milliseconds to wait.
53
- * @public
54
- */
55
- export declare const delay: (timeMs: number) => Promise<void>;
7
+ /* Excluded from this release type: delay */
56
8
 
57
- /**
58
- * Ordered {@link https://en.wikipedia.org/wiki/Heap_(data_structure) | Heap} data structure implementation.
59
- * @public
60
- */
61
- export declare class Heap<T> {
62
- comp: IComparer<T>;
63
- private L;
64
- /**
65
- * Creates an instance of `Heap` with comparer.
66
- * @param comp - A comparer that specify how elements are ordered.
67
- */
68
- constructor(comp: IComparer<T>);
69
- /**
70
- * Return the smallest element in the heap as determined by the order of the comparer
71
- *
72
- * @returns Heap node containing the smallest element
73
- */
74
- peek(): IHeapNode<T>;
75
- /**
76
- * Get and remove the smallest element in the heap as determined by the order of the comparer
77
- *
78
- * @returns The smallest value in the heap
79
- */
80
- get(): T;
81
- /**
82
- * Add a value to the heap
83
- *
84
- * @param x - value to add
85
- * @returns The heap node that contains the value
86
- */
87
- add(x: T): IHeapNode<T>;
88
- /**
89
- * Allows for the Heap to be updated after a node's value changes.
90
- */
91
- update(node: IHeapNode<T>): void;
92
- /**
93
- * Removes the given node from the heap.
94
- *
95
- * @param node - The node to remove from the heap.
96
- */
97
- remove(node: IHeapNode<T>): void;
98
- /**
99
- * Get the number of elements in the Heap.
100
- *
101
- * @returns The number of elements in the Heap.
102
- */
103
- count(): number;
104
- private fixup;
105
- private isGreaterThanParent;
106
- private fixdown;
107
- private swap;
108
- }
9
+ /* Excluded from this release type: Heap */
109
10
 
110
- /**
111
- * Interface for a comparer.
112
- * @public
113
- */
114
- export declare interface IComparer<T> {
115
- /**
116
- * The minimum value of type T.
117
- */
118
- min: T;
119
- /**
120
- * Compare the two value
121
- *
122
- * @returns 0 if the value is equal, negative number if a is smaller then b, positive number otherwise
123
- */
124
- compare(a: T, b: T): number;
125
- }
11
+ /* Excluded from this release type: IComparer */
126
12
 
127
- /**
128
- * Interface to a node in {@link Heap}.
129
- * @public
130
- */
131
- export declare interface IHeapNode<T> {
132
- value: T;
133
- position: number;
134
- }
13
+ /* Excluded from this release type: IHeapNode */
135
14
 
136
- /**
137
- * Timer which offers a promise that fulfills when the timer
138
- * completes.
139
- * @public
140
- */
141
- export declare interface IPromiseTimer extends ITimer {
142
- /**
143
- * Starts the timer and returns a promise that
144
- * resolves when the timer times out or is canceled.
145
- */
146
- start(): Promise<IPromiseTimerResult>;
147
- }
15
+ /* Excluded from this release type: IPromiseTimer */
148
16
 
149
- /**
150
- * @public
151
- */
152
- export declare interface IPromiseTimerResult {
153
- timerResult: "timeout" | "cancel";
154
- }
17
+ /* Excluded from this release type: IPromiseTimerResult */
155
18
 
156
- /**
157
- * @public
158
- */
159
- export declare interface ITimer {
160
- /**
161
- * True if timer is currently running
162
- */
163
- readonly hasTimer: boolean;
164
- /**
165
- * Starts the timer
166
- */
167
- start(): void;
168
- /**
169
- * Cancels the timer if already running
170
- */
171
- clear(): void;
172
- }
19
+ /* Excluded from this release type: ITimer */
173
20
 
174
- /**
175
- * Helper class for lazy initialized values. Ensures the value is only generated once, and remain immutable.
176
- * @public
177
- */
178
- export declare class Lazy<T> {
179
- private readonly valueGenerator;
180
- private _value;
181
- private _evaluated;
182
- /**
183
- * Instantiates an instance of Lazy<T>.
184
- * @param valueGenerator - The function that will generate the value when value is accessed the first time.
185
- */
186
- constructor(valueGenerator: () => T);
187
- /**
188
- * Return true if the value as been generated, otherwise false.
189
- */
190
- get evaluated(): boolean;
191
- /**
192
- * Get the value. If this is the first call the value will be generated.
193
- */
194
- get value(): T;
195
- }
21
+ /* Excluded from this release type: Lazy */
196
22
 
197
- /**
198
- * A lazy evaluated promise. The execute function is delayed until
199
- * the promise is used, e.g. await, then, catch ...
200
- * The execute function is only called once.
201
- * All calls are then proxied to the promise returned by the execute method.
202
- * @public
203
- */
204
- export declare class LazyPromise<T> implements Promise<T> {
205
- private readonly execute;
206
- get [Symbol.toStringTag](): string;
207
- private result;
208
- constructor(execute: () => Promise<T>);
209
- then<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | null | undefined, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | null | undefined): Promise<TResult1 | TResult2>;
210
- catch<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | null | undefined): Promise<T | TResult>;
211
- finally(onfinally?: (() => void) | null | undefined): Promise<T>;
212
- private getPromise;
213
- }
23
+ /* Excluded from this release type: LazyPromise */
214
24
 
215
- /**
216
- * A comparer for numbers.
217
- * @public
218
- */
219
- export declare const NumberComparer: IComparer<number>;
25
+ /* Excluded from this release type: NumberComparer */
220
26
 
221
- /**
222
- * A specialized cache for async work, allowing you to safely cache the promised result of some async work
223
- * without fear of running it multiple times or losing track of errors.
224
- * @public
225
- */
226
- export declare class PromiseCache<TKey, TResult> {
227
- private readonly cache;
228
- private readonly gc;
229
- private readonly removeOnError;
230
- /**
231
- * Create the PromiseCache with the given options, with the following defaults:
232
- *
233
- * expiry: indefinite, removeOnError: true for all errors
234
- */
235
- constructor({ expiry, removeOnError, }?: PromiseCacheOptions);
236
- /**
237
- * Check if there's anything cached at the given key
238
- */
239
- has(key: TKey): boolean;
240
- /**
241
- * Get the Promise for the given key, or undefined if it's not found.
242
- * Extend expiry if applicable.
243
- */
244
- get(key: TKey): Promise<TResult> | undefined;
245
- /**
246
- * Remove the Promise for the given key, returning true if it was found and removed
247
- */
248
- remove(key: TKey): boolean;
249
- /**
250
- * Try to add the result of the given asyncFn, without overwriting an existing cache entry at that key.
251
- * Returns a Promise for the added or existing async work being done at that key.
252
- * @param key - key name where to store the async work
253
- * @param asyncFn - the async work to do and store, if not already in progress under the given key
254
- */
255
- addOrGet(key: TKey, asyncFn: () => Promise<TResult>): Promise<TResult>;
256
- /**
257
- * Try to add the result of the given asyncFn, without overwriting an existing cache entry at that key.
258
- * Returns false if the cache already contained an entry at that key, and true otherwise.
259
- * @param key - key name where to store the async work
260
- * @param asyncFn - the async work to do and store, if not already in progress under the given key
261
- */
262
- add(key: TKey, asyncFn: () => Promise<TResult>): boolean;
263
- /**
264
- * Try to add the given value, without overwriting an existing cache entry at that key.
265
- * Returns a Promise for the added or existing async work being done at that key.
266
- * @param key - key name where to store the async work
267
- * @param value - value to store
268
- */
269
- addValueOrGet(key: TKey, value: TResult): Promise<TResult>;
270
- /**
271
- * Try to add the given value, without overwriting an existing cache entry at that key.
272
- * Returns false if the cache already contained an entry at that key, and true otherwise.
273
- * @param key - key name where to store the value
274
- * @param value - value to store
275
- */
276
- addValue(key: TKey, value: TResult): boolean;
277
- }
27
+ /* Excluded from this release type: PromiseCache */
278
28
 
279
- /**
280
- * Three supported expiry policies:
281
- * - indefinite: entries don't expire and must be explicitly removed
282
- * - absolute: entries expire after the given duration in MS, even if accessed multiple times in the mean time
283
- * - sliding: entries expire after the given duration in MS of inactivity (i.e. get resets the clock)
284
- * @public
285
- */
286
- export declare type PromiseCacheExpiry = {
287
- policy: "indefinite";
288
- } | {
289
- policy: "absolute" | "sliding";
290
- durationMs: number;
291
- };
29
+ /* Excluded from this release type: PromiseCacheExpiry */
292
30
 
293
- /**
294
- * Options for configuring the {@link PromiseCache}
295
- * @public
296
- */
297
- export declare interface PromiseCacheOptions {
298
- /**
299
- * Common expiration policy for all items added to this cache
300
- */
301
- expiry?: PromiseCacheExpiry;
302
- /**
303
- * If the stored Promise is rejected with a particular error, should the given key be removed?
304
- */
305
- removeOnError?: (error: any) => boolean;
306
- }
31
+ /* Excluded from this release type: PromiseCacheOptions */
307
32
 
308
- /**
309
- * This class is a wrapper over setTimeout and clearTimeout which
310
- * makes it simpler to keep track of recurring timeouts with the
311
- * same handlers and timeouts, while also providing a promise that
312
- * resolves when it times out.
313
- * @public
314
- */
315
- export declare class PromiseTimer implements IPromiseTimer {
316
- private deferred?;
317
- private readonly timer;
318
- /**
319
- * {@inheritDoc Timer.hasTimer}
320
- */
321
- get hasTimer(): boolean;
322
- constructor(defaultTimeout: number, defaultHandler: () => void);
323
- /**
324
- * {@inheritDoc IPromiseTimer.start}
325
- */
326
- start(ms?: number, handler?: () => void): Promise<IPromiseTimerResult>;
327
- clear(): void;
328
- protected wrapHandler(handler: () => void): void;
329
- }
33
+ /* Excluded from this release type: PromiseTimer */
330
34
 
331
- /**
332
- * Sets timeouts like the setTimeout function allowing timeouts to exceed the setTimeout's max timeout limit.
333
- * Timeouts may not be exactly accurate due to browser implementations and the OS.
334
- * https://stackoverflow.com/questions/21097421/what-is-the-reason-javascript-settimeout-is-so-inaccurate
335
- * @param timeoutFn - Executed when the timeout expires
336
- * @param timeoutMs - Duration of the timeout in milliseconds
337
- * @param setTimeoutIdFn - Executed to update the timeout if multiple timeouts are required when
338
- * timeoutMs greater than maxTimeout
339
- * @returns The initial timeout
340
- * @public
341
- */
342
- export declare function setLongTimeout(timeoutFn: () => void, timeoutMs: number, setTimeoutIdFn?: (timeoutId: ReturnType<typeof setTimeout>) => void): ReturnType<typeof setTimeout>;
35
+ /* Excluded from this release type: setLongTimeout */
343
36
 
344
- /**
345
- * This class is a thin wrapper over setTimeout and clearTimeout which
346
- * makes it simpler to keep track of recurring timeouts with the same
347
- * or similar handlers and timeouts. This class supports long timeouts
348
- * or timeouts exceeding (2^31)-1 ms or approximately 24.8 days.
349
- * @public
350
- */
351
- export declare class Timer implements ITimer {
352
- private readonly defaultTimeout;
353
- private readonly defaultHandler;
354
- private readonly getCurrentTick;
355
- /**
356
- * Returns true if the timer is running.
357
- */
358
- get hasTimer(): boolean;
359
- private runningState;
360
- constructor(defaultTimeout: number, defaultHandler: () => void, getCurrentTick?: () => number);
361
- /**
362
- * Calls setTimeout and tracks the resulting timeout.
363
- * @param ms - overrides default timeout in ms
364
- * @param handler - overrides default handler
365
- */
366
- start(ms?: number, handler?: () => void): void;
367
- /**
368
- * Calls clearTimeout on the underlying timeout if running.
369
- */
370
- clear(): void;
371
- /**
372
- * Restarts the timer with the new handler and duration.
373
- * If a new handler is passed, the original handler may
374
- * never execute.
375
- * This is a potentially more efficient way to clear and start
376
- * a new timer.
377
- * @param ms - overrides previous or default timeout in ms
378
- * @param handler - overrides previous or default handler
379
- */
380
- restart(ms?: number, handler?: () => void): void;
381
- private startCore;
382
- private handler;
383
- private calculateRemainingTime;
384
- }
37
+ /* Excluded from this release type: Timer */
385
38
 
386
- /**
387
- * This function can be used to assert at compile time that a given value has type never.
388
- * One common usage is in the default case of a switch block,
389
- * to ensure that all cases are explicitly handled.
390
- *
391
- * Example:
392
- * ```typescript
393
- * const bool: true | false = ...;
394
- * switch(bool) {
395
- * case true: {...}
396
- * case false: {...}
397
- * default: unreachableCase(bool);
398
- * }
399
- * ```
400
- * @public
401
- */
402
- export declare function unreachableCase(_: never, message?: string): never;
39
+ /* Excluded from this release type: unreachableCase */
403
40
 
404
41
  export { }
@@ -7,7 +7,7 @@
7
7
  * A number should not be specified manually: use a string.
8
8
  * Before a release, policy-check should be run, which will convert any asserts still using strings to
9
9
  * use numbered error codes instead.
10
- * @public
10
+ * @internal
11
11
  */
12
12
  export declare function assert(condition: boolean, message: string | number): asserts condition;
13
13
 
@@ -25,7 +25,7 @@ export declare const compareArrays: <T>(left: readonly T[], right: readonly T[],
25
25
 
26
26
  /**
27
27
  * A deferred creates a promise and the ability to resolve or reject it
28
- * @public
28
+ * @internal
29
29
  */
30
30
  export declare class Deferred<T> {
31
31
  private readonly p;
@@ -60,13 +60,13 @@ export declare class Deferred<T> {
60
60
  /**
61
61
  * Returns a promise that resolves after `timeMs`.
62
62
  * @param timeMs - Time in milliseconds to wait.
63
- * @public
63
+ * @internal
64
64
  */
65
65
  export declare const delay: (timeMs: number) => Promise<void>;
66
66
 
67
67
  /**
68
68
  * Ordered {@link https://en.wikipedia.org/wiki/Heap_(data_structure) | Heap} data structure implementation.
69
- * @public
69
+ * @internal
70
70
  */
71
71
  export declare class Heap<T> {
72
72
  comp: IComparer<T>;
@@ -119,7 +119,7 @@ export declare class Heap<T> {
119
119
 
120
120
  /**
121
121
  * Interface for a comparer.
122
- * @public
122
+ * @internal
123
123
  */
124
124
  export declare interface IComparer<T> {
125
125
  /**
@@ -136,7 +136,7 @@ export declare interface IComparer<T> {
136
136
 
137
137
  /**
138
138
  * Interface to a node in {@link Heap}.
139
- * @public
139
+ * @internal
140
140
  */
141
141
  export declare interface IHeapNode<T> {
142
142
  value: T;
@@ -146,7 +146,7 @@ export declare interface IHeapNode<T> {
146
146
  /**
147
147
  * Timer which offers a promise that fulfills when the timer
148
148
  * completes.
149
- * @public
149
+ * @internal
150
150
  */
151
151
  export declare interface IPromiseTimer extends ITimer {
152
152
  /**
@@ -157,14 +157,14 @@ export declare interface IPromiseTimer extends ITimer {
157
157
  }
158
158
 
159
159
  /**
160
- * @public
160
+ * @internal
161
161
  */
162
162
  export declare interface IPromiseTimerResult {
163
163
  timerResult: "timeout" | "cancel";
164
164
  }
165
165
 
166
166
  /**
167
- * @public
167
+ * @internal
168
168
  */
169
169
  export declare interface ITimer {
170
170
  /**
@@ -183,7 +183,7 @@ export declare interface ITimer {
183
183
 
184
184
  /**
185
185
  * Helper class for lazy initialized values. Ensures the value is only generated once, and remain immutable.
186
- * @public
186
+ * @internal
187
187
  */
188
188
  export declare class Lazy<T> {
189
189
  private readonly valueGenerator;
@@ -209,7 +209,7 @@ export declare class Lazy<T> {
209
209
  * the promise is used, e.g. await, then, catch ...
210
210
  * The execute function is only called once.
211
211
  * All calls are then proxied to the promise returned by the execute method.
212
- * @public
212
+ * @internal
213
213
  */
214
214
  export declare class LazyPromise<T> implements Promise<T> {
215
215
  private readonly execute;
@@ -224,14 +224,14 @@ export declare class LazyPromise<T> implements Promise<T> {
224
224
 
225
225
  /**
226
226
  * A comparer for numbers.
227
- * @public
227
+ * @internal
228
228
  */
229
229
  export declare const NumberComparer: IComparer<number>;
230
230
 
231
231
  /**
232
232
  * A specialized cache for async work, allowing you to safely cache the promised result of some async work
233
233
  * without fear of running it multiple times or losing track of errors.
234
- * @public
234
+ * @internal
235
235
  */
236
236
  export declare class PromiseCache<TKey, TResult> {
237
237
  private readonly cache;
@@ -291,7 +291,7 @@ export declare class PromiseCache<TKey, TResult> {
291
291
  * - indefinite: entries don't expire and must be explicitly removed
292
292
  * - absolute: entries expire after the given duration in MS, even if accessed multiple times in the mean time
293
293
  * - sliding: entries expire after the given duration in MS of inactivity (i.e. get resets the clock)
294
- * @public
294
+ * @internal
295
295
  */
296
296
  export declare type PromiseCacheExpiry = {
297
297
  policy: "indefinite";
@@ -302,7 +302,7 @@ export declare type PromiseCacheExpiry = {
302
302
 
303
303
  /**
304
304
  * Options for configuring the {@link PromiseCache}
305
- * @public
305
+ * @internal
306
306
  */
307
307
  export declare interface PromiseCacheOptions {
308
308
  /**
@@ -320,7 +320,7 @@ export declare interface PromiseCacheOptions {
320
320
  * makes it simpler to keep track of recurring timeouts with the
321
321
  * same handlers and timeouts, while also providing a promise that
322
322
  * resolves when it times out.
323
- * @public
323
+ * @internal
324
324
  */
325
325
  export declare class PromiseTimer implements IPromiseTimer {
326
326
  private deferred?;
@@ -347,7 +347,7 @@ export declare class PromiseTimer implements IPromiseTimer {
347
347
  * @param setTimeoutIdFn - Executed to update the timeout if multiple timeouts are required when
348
348
  * timeoutMs greater than maxTimeout
349
349
  * @returns The initial timeout
350
- * @public
350
+ * @internal
351
351
  */
352
352
  export declare function setLongTimeout(timeoutFn: () => void, timeoutMs: number, setTimeoutIdFn?: (timeoutId: ReturnType<typeof setTimeout>) => void): ReturnType<typeof setTimeout>;
353
353
 
@@ -356,7 +356,7 @@ export declare function setLongTimeout(timeoutFn: () => void, timeoutMs: number,
356
356
  * makes it simpler to keep track of recurring timeouts with the same
357
357
  * or similar handlers and timeouts. This class supports long timeouts
358
358
  * or timeouts exceeding (2^31)-1 ms or approximately 24.8 days.
359
- * @public
359
+ * @internal
360
360
  */
361
361
  export declare class Timer implements ITimer {
362
362
  private readonly defaultTimeout;
@@ -407,7 +407,7 @@ export declare class Timer implements ITimer {
407
407
  * default: unreachableCase(bool);
408
408
  * }
409
409
  * ```
410
- * @public
410
+ * @internal
411
411
  */
412
412
  export declare function unreachableCase(_: never, message?: string): never;
413
413
 
package/lib/delay.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Returns a promise that resolves after `timeMs`.
7
7
  * @param timeMs - Time in milliseconds to wait.
8
- * @public
8
+ * @internal
9
9
  */
10
10
  export declare const delay: (timeMs: number) => Promise<void>;
11
11
  //# sourceMappingURL=delay.d.ts.map
package/lib/delay.js CHANGED
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Returns a promise that resolves after `timeMs`.
7
7
  * @param timeMs - Time in milliseconds to wait.
8
- * @public
8
+ * @internal
9
9
  */
10
10
  export const delay = async (timeMs) => new Promise((resolve) => setTimeout(() => resolve(), timeMs));
11
11
  //# sourceMappingURL=delay.js.map
package/lib/delay.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"delay.js","sourceRoot":"","sources":["../src/delay.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,EAAE,MAAc,EAAiB,EAAE,CAC5D,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Returns a promise that resolves after `timeMs`.\n * @param timeMs - Time in milliseconds to wait.\n * @public\n */\nexport const delay = async (timeMs: number): Promise<void> =>\n\tnew Promise((resolve) => setTimeout(() => resolve(), timeMs));\n"]}
1
+ {"version":3,"file":"delay.js","sourceRoot":"","sources":["../src/delay.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;;GAIG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG,KAAK,EAAE,MAAc,EAAiB,EAAE,CAC5D,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE,MAAM,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Returns a promise that resolves after `timeMs`.\n * @param timeMs - Time in milliseconds to wait.\n * @internal\n */\nexport const delay = async (timeMs: number): Promise<void> =>\n\tnew Promise((resolve) => setTimeout(() => resolve(), timeMs));\n"]}
package/lib/heap.d.ts CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  /**
6
6
  * Interface for a comparer.
7
- * @public
7
+ * @internal
8
8
  */
9
9
  export interface IComparer<T> {
10
10
  /**
@@ -20,12 +20,12 @@ export interface IComparer<T> {
20
20
  }
21
21
  /**
22
22
  * A comparer for numbers.
23
- * @public
23
+ * @internal
24
24
  */
25
25
  export declare const NumberComparer: IComparer<number>;
26
26
  /**
27
27
  * Interface to a node in {@link Heap}.
28
- * @public
28
+ * @internal
29
29
  */
30
30
  export interface IHeapNode<T> {
31
31
  value: T;
@@ -33,7 +33,7 @@ export interface IHeapNode<T> {
33
33
  }
34
34
  /**
35
35
  * Ordered {@link https://en.wikipedia.org/wiki/Heap_(data_structure) | Heap} data structure implementation.
36
- * @public
36
+ * @internal
37
37
  */
38
38
  export declare class Heap<T> {
39
39
  comp: IComparer<T>;
package/lib/heap.js CHANGED
@@ -4,7 +4,7 @@
4
4
  */
5
5
  /**
6
6
  * A comparer for numbers.
7
- * @public
7
+ * @internal
8
8
  */
9
9
  export const NumberComparer = {
10
10
  /**
@@ -19,7 +19,7 @@ export const NumberComparer = {
19
19
  };
20
20
  /**
21
21
  * Ordered {@link https://en.wikipedia.org/wiki/Heap_(data_structure) | Heap} data structure implementation.
22
- * @public
22
+ * @internal
23
23
  */
24
24
  export class Heap {
25
25
  /**