@everyonesoftware/common 7.0.0 → 8.0.0

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.
@@ -80,6 +80,49 @@ declare abstract class Indexable<T> implements Iterable<T> {
80
80
  static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
81
81
  }
82
82
 
83
+ /**
84
+ * An {@link Indexable} that can change it's values.
85
+ */
86
+ declare abstract class MutableIndexable<T> implements Indexable<T> {
87
+ static create<T>(values?: JavascriptIterable<T>): MutableIndexable<T>;
88
+ abstract get(index: number): SyncResult<T>;
89
+ /**
90
+ * Set the value at the provided index to the be the provided value.
91
+ * @param index The index of the value to set.
92
+ * @param value The value to set.
93
+ */
94
+ abstract set(index: number, value: T): this;
95
+ abstract iterate(): Iterator<T>;
96
+ toArray(): SyncResult<T[]>;
97
+ static toArray<T>(indexable: Indexable<T>): SyncResult<T[]>;
98
+ any(): SyncResult<boolean>;
99
+ static any<T>(indexable: Indexable<T>): SyncResult<boolean>;
100
+ getCount(): SyncResult<number>;
101
+ static getCount<T>(indexable: Indexable<T>): SyncResult<number>;
102
+ equals(right: JavascriptIterable<T>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
103
+ static equals<T>(left: Indexable<T>, right: JavascriptIterable<T>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
104
+ toString(toStringFunctions?: ToStringFunctions): string;
105
+ static toString<T>(indexable: Indexable<T>, toStringFunctions?: ToStringFunctions): string;
106
+ concatenate(...toConcatenate: JavascriptIterable<T>[]): Iterable<T>;
107
+ static concatenate<T>(indexable: Indexable<T>, ...toConcatenate: JavascriptIterable<T>[]): Iterable<T>;
108
+ map<TOutput>(mapping: (value: T) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
109
+ static map<TInput, TOutput>(indexable: Indexable<TInput>, mapping: (value: TInput) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
110
+ flatMap<TOutput>(mapping: (value: T) => JavascriptIterable<TOutput>): Iterable<TOutput>;
111
+ static flatMap<TInput, TOutput>(indexable: Indexable<TInput>, mapping: (value: TInput) => JavascriptIterable<TOutput>): Iterable<TOutput>;
112
+ where(condition: (value: T) => (boolean | SyncResult<boolean>)): Iterable<T>;
113
+ static where<T>(indexable: Indexable<T>, condition: (value: T) => (boolean | SyncResult<boolean>)): Iterable<T>;
114
+ instanceOf<TOutput extends T>(typeOrTypeCheck: Type<TOutput> | ((value: T) => value is TOutput)): Iterable<TOutput>;
115
+ static instanceOf<TInput, TOutput extends TInput>(indexable: Indexable<TInput>, typeOrTypeCheck: Type<TOutput> | ((value: TInput) => value is TOutput)): Iterable<TOutput>;
116
+ first(condition?: ((value: T) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<T>;
117
+ static first<T>(indexable: Indexable<T>, condition?: (value: T) => (boolean | SyncResult<boolean>)): SyncResult<T>;
118
+ last(condition?: ((value: T) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<T>;
119
+ static last<T>(indexable: Indexable<T>, condition?: (value: T) => (boolean | SyncResult<boolean>)): SyncResult<T>;
120
+ [Symbol.iterator](): JavascriptIterator<T>;
121
+ static [Symbol.iterator]<T>(indexable: Indexable<T>): JavascriptIterator<T>;
122
+ contains(value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
123
+ static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
124
+ }
125
+
83
126
  /**
84
127
  * A collection of parameters that can be passed to an assert error message function.
85
128
  */
@@ -306,7 +349,7 @@ declare class SyncDisposable implements Disposable {
306
349
  isDisposed(): boolean;
307
350
  }
308
351
 
309
- declare abstract class List<T> implements Indexable<T> {
352
+ declare abstract class List<T> implements MutableIndexable<T> {
310
353
  static create<T>(values?: JavascriptIterable<T>): List<T>;
311
354
  /**
312
355
  * Add the provided value to the end of this {@link List}.
@@ -3376,4 +3419,4 @@ declare class WonderlandTrailClient implements HttpClient {
3376
3419
  }): PromiseAsyncResult<Iterable<WonderlandTrailItinerary>>;
3377
3420
  }
3378
3421
 
3379
- export { ANSIStyles, type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, CharacterTable, CharacterWriteStream, CommandLineParameter, CommandLineParameters, Comparable, Comparer, Comparison, ConcatenateIterable, ConcatenateIterator, Condition, CurrentProcess, DateTime, Disposable, EmptyError, EqualFunctions, FetchHttpClient, FetchHttpIncomingResponse, FlatMapIterable, FlatMapIterator, Generator, type GeneratorControl, HttpClient, HttpHeader, HttpHeaders, HttpIncomingRequest, HttpIncomingResponse, HttpMethod, HttpOutgoingRequest, HttpOutgoingResponse, HttpServer, InMemoryCharacterWriteStream, IndentedCharacterWriteStream, Indexable, Iterable, Iterator, IteratorToJavascriptIteratorAdapter, JavascriptArrayList, JavascriptAsyncIterable, JavascriptAsyncIterator, JavascriptAsyncIteratorToAsyncIteratorAdapter, JavascriptIterable, JavascriptIterator, JavascriptIteratorResult, JavascriptIteratorToIteratorAdapter, JavascriptMapMap, JavascriptSetSet, List, ListQueue, ListStack, LuxonDateTime, Map, MapAsyncIterator, type MapEntry, MapIterable, MapIterator, MutableCondition, MutableHttpHeaders, MutableMap, Network, Node, NodeJSCharacterWriteStream, NodeJSHttpIncomingRequest, NodeJSHttpServer, NotFoundError, PostCondition, PostConditionError, PreCondition, PreConditionError, PromiseAsyncResult, Property, Queue, RealNetwork, RecreationDotGovClient, RecreationDotGovDivisionAvailability, type RecreationDotGovDivisionAvailabilityJson, type RecreationDotGovDivisionDayAvailability, type RecreationDotGovDivisionJson, RecreationDotGovError, type RecreationDotGovErrorResponse, type RecreationDotGovPermitItineraryJson, SearchControl, Set, SkipAsyncIterator, SkipIterator, Stack, StringComparer, StringIterator, SyncDisposable, SyncResult, TakeAsyncIterator, TakeIterator, ToStringFunctions, Type, WhereAsyncIterator, WhereIterable, WhereIterator, WonderlandTrailAvailability, type WonderlandTrailAvailabilityType, WonderlandTrailClient, WonderlandTrailConnection, WonderlandTrailConnections, WonderlandTrailDirection, WonderlandTrailItinerary, type WonderlandTrailLocation, WonderlandTrailLocations, WonderlandTrailReservationType, andList, depthFirstSearch, escape, escapeAndQuote, getLength, httpMethodToString, isDigit, isLetter, isLetterOrDigit, isLowercasedLetter, isMap, isMutableMap, isSet, isUppercasedLetter, isWhitespace, isWonderlandTrailLocation, join, orList, parseHttpMethod, quote, toString };
3422
+ export { ANSIStyles, type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, CharacterTable, CharacterWriteStream, CommandLineParameter, CommandLineParameters, Comparable, Comparer, Comparison, ConcatenateIterable, ConcatenateIterator, Condition, CurrentProcess, DateTime, Disposable, EmptyError, EqualFunctions, FetchHttpClient, FetchHttpIncomingResponse, FlatMapIterable, FlatMapIterator, Generator, type GeneratorControl, HttpClient, HttpHeader, HttpHeaders, HttpIncomingRequest, HttpIncomingResponse, HttpMethod, HttpOutgoingRequest, HttpOutgoingResponse, HttpServer, InMemoryCharacterWriteStream, IndentedCharacterWriteStream, Indexable, Iterable, Iterator, IteratorToJavascriptIteratorAdapter, JavascriptArrayList, JavascriptAsyncIterable, JavascriptAsyncIterator, JavascriptAsyncIteratorToAsyncIteratorAdapter, JavascriptIterable, JavascriptIterator, JavascriptIteratorResult, JavascriptIteratorToIteratorAdapter, JavascriptMapMap, JavascriptSetSet, List, ListQueue, ListStack, LuxonDateTime, Map, MapAsyncIterator, type MapEntry, MapIterable, MapIterator, MutableCondition, MutableHttpHeaders, MutableIndexable, MutableMap, Network, Node, NodeJSCharacterWriteStream, NodeJSHttpIncomingRequest, NodeJSHttpServer, NotFoundError, PostCondition, PostConditionError, PreCondition, PreConditionError, PromiseAsyncResult, Property, Queue, RealNetwork, RecreationDotGovClient, RecreationDotGovDivisionAvailability, type RecreationDotGovDivisionAvailabilityJson, type RecreationDotGovDivisionDayAvailability, type RecreationDotGovDivisionJson, RecreationDotGovError, type RecreationDotGovErrorResponse, type RecreationDotGovPermitItineraryJson, SearchControl, Set, SkipAsyncIterator, SkipIterator, Stack, StringComparer, StringIterator, SyncDisposable, SyncResult, TakeAsyncIterator, TakeIterator, ToStringFunctions, Type, WhereAsyncIterator, WhereIterable, WhereIterator, WonderlandTrailAvailability, type WonderlandTrailAvailabilityType, WonderlandTrailClient, WonderlandTrailConnection, WonderlandTrailConnections, WonderlandTrailDirection, WonderlandTrailItinerary, type WonderlandTrailLocation, WonderlandTrailLocations, WonderlandTrailReservationType, andList, depthFirstSearch, escape, escapeAndQuote, getLength, httpMethodToString, isDigit, isLetter, isLetterOrDigit, isLowercasedLetter, isMap, isMutableMap, isSet, isUppercasedLetter, isWhitespace, isWonderlandTrailLocation, join, orList, parseHttpMethod, quote, toString };
@@ -80,6 +80,49 @@ declare abstract class Indexable<T> implements Iterable<T> {
80
80
  static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
81
81
  }
82
82
 
83
+ /**
84
+ * An {@link Indexable} that can change it's values.
85
+ */
86
+ declare abstract class MutableIndexable<T> implements Indexable<T> {
87
+ static create<T>(values?: JavascriptIterable<T>): MutableIndexable<T>;
88
+ abstract get(index: number): SyncResult<T>;
89
+ /**
90
+ * Set the value at the provided index to the be the provided value.
91
+ * @param index The index of the value to set.
92
+ * @param value The value to set.
93
+ */
94
+ abstract set(index: number, value: T): this;
95
+ abstract iterate(): Iterator<T>;
96
+ toArray(): SyncResult<T[]>;
97
+ static toArray<T>(indexable: Indexable<T>): SyncResult<T[]>;
98
+ any(): SyncResult<boolean>;
99
+ static any<T>(indexable: Indexable<T>): SyncResult<boolean>;
100
+ getCount(): SyncResult<number>;
101
+ static getCount<T>(indexable: Indexable<T>): SyncResult<number>;
102
+ equals(right: JavascriptIterable<T>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
103
+ static equals<T>(left: Indexable<T>, right: JavascriptIterable<T>, equalFunctions?: EqualFunctions): SyncResult<boolean>;
104
+ toString(toStringFunctions?: ToStringFunctions): string;
105
+ static toString<T>(indexable: Indexable<T>, toStringFunctions?: ToStringFunctions): string;
106
+ concatenate(...toConcatenate: JavascriptIterable<T>[]): Iterable<T>;
107
+ static concatenate<T>(indexable: Indexable<T>, ...toConcatenate: JavascriptIterable<T>[]): Iterable<T>;
108
+ map<TOutput>(mapping: (value: T) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
109
+ static map<TInput, TOutput>(indexable: Indexable<TInput>, mapping: (value: TInput) => (TOutput | SyncResult<TOutput>)): Iterable<TOutput>;
110
+ flatMap<TOutput>(mapping: (value: T) => JavascriptIterable<TOutput>): Iterable<TOutput>;
111
+ static flatMap<TInput, TOutput>(indexable: Indexable<TInput>, mapping: (value: TInput) => JavascriptIterable<TOutput>): Iterable<TOutput>;
112
+ where(condition: (value: T) => (boolean | SyncResult<boolean>)): Iterable<T>;
113
+ static where<T>(indexable: Indexable<T>, condition: (value: T) => (boolean | SyncResult<boolean>)): Iterable<T>;
114
+ instanceOf<TOutput extends T>(typeOrTypeCheck: Type<TOutput> | ((value: T) => value is TOutput)): Iterable<TOutput>;
115
+ static instanceOf<TInput, TOutput extends TInput>(indexable: Indexable<TInput>, typeOrTypeCheck: Type<TOutput> | ((value: TInput) => value is TOutput)): Iterable<TOutput>;
116
+ first(condition?: ((value: T) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<T>;
117
+ static first<T>(indexable: Indexable<T>, condition?: (value: T) => (boolean | SyncResult<boolean>)): SyncResult<T>;
118
+ last(condition?: ((value: T) => (boolean | SyncResult<boolean>)) | undefined): SyncResult<T>;
119
+ static last<T>(indexable: Indexable<T>, condition?: (value: T) => (boolean | SyncResult<boolean>)): SyncResult<T>;
120
+ [Symbol.iterator](): JavascriptIterator<T>;
121
+ static [Symbol.iterator]<T>(indexable: Indexable<T>): JavascriptIterator<T>;
122
+ contains(value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
123
+ static contains<T>(indexable: Indexable<T>, value: T, equalFunctions?: EqualFunctions): SyncResult<boolean>;
124
+ }
125
+
83
126
  /**
84
127
  * A collection of parameters that can be passed to an assert error message function.
85
128
  */
@@ -306,7 +349,7 @@ declare class SyncDisposable implements Disposable {
306
349
  isDisposed(): boolean;
307
350
  }
308
351
 
309
- declare abstract class List<T> implements Indexable<T> {
352
+ declare abstract class List<T> implements MutableIndexable<T> {
310
353
  static create<T>(values?: JavascriptIterable<T>): List<T>;
311
354
  /**
312
355
  * Add the provided value to the end of this {@link List}.
@@ -3376,4 +3419,4 @@ declare class WonderlandTrailClient implements HttpClient {
3376
3419
  }): PromiseAsyncResult<Iterable<WonderlandTrailItinerary>>;
3377
3420
  }
3378
3421
 
3379
- export { ANSIStyles, type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, CharacterTable, CharacterWriteStream, CommandLineParameter, CommandLineParameters, Comparable, Comparer, Comparison, ConcatenateIterable, ConcatenateIterator, Condition, CurrentProcess, DateTime, Disposable, EmptyError, EqualFunctions, FetchHttpClient, FetchHttpIncomingResponse, FlatMapIterable, FlatMapIterator, Generator, type GeneratorControl, HttpClient, HttpHeader, HttpHeaders, HttpIncomingRequest, HttpIncomingResponse, HttpMethod, HttpOutgoingRequest, HttpOutgoingResponse, HttpServer, InMemoryCharacterWriteStream, IndentedCharacterWriteStream, Indexable, Iterable, Iterator, IteratorToJavascriptIteratorAdapter, JavascriptArrayList, JavascriptAsyncIterable, JavascriptAsyncIterator, JavascriptAsyncIteratorToAsyncIteratorAdapter, JavascriptIterable, JavascriptIterator, JavascriptIteratorResult, JavascriptIteratorToIteratorAdapter, JavascriptMapMap, JavascriptSetSet, List, ListQueue, ListStack, LuxonDateTime, Map, MapAsyncIterator, type MapEntry, MapIterable, MapIterator, MutableCondition, MutableHttpHeaders, MutableMap, Network, Node, NodeJSCharacterWriteStream, NodeJSHttpIncomingRequest, NodeJSHttpServer, NotFoundError, PostCondition, PostConditionError, PreCondition, PreConditionError, PromiseAsyncResult, Property, Queue, RealNetwork, RecreationDotGovClient, RecreationDotGovDivisionAvailability, type RecreationDotGovDivisionAvailabilityJson, type RecreationDotGovDivisionDayAvailability, type RecreationDotGovDivisionJson, RecreationDotGovError, type RecreationDotGovErrorResponse, type RecreationDotGovPermitItineraryJson, SearchControl, Set, SkipAsyncIterator, SkipIterator, Stack, StringComparer, StringIterator, SyncDisposable, SyncResult, TakeAsyncIterator, TakeIterator, ToStringFunctions, Type, WhereAsyncIterator, WhereIterable, WhereIterator, WonderlandTrailAvailability, type WonderlandTrailAvailabilityType, WonderlandTrailClient, WonderlandTrailConnection, WonderlandTrailConnections, WonderlandTrailDirection, WonderlandTrailItinerary, type WonderlandTrailLocation, WonderlandTrailLocations, WonderlandTrailReservationType, andList, depthFirstSearch, escape, escapeAndQuote, getLength, httpMethodToString, isDigit, isLetter, isLetterOrDigit, isLowercasedLetter, isMap, isMutableMap, isSet, isUppercasedLetter, isWhitespace, isWonderlandTrailLocation, join, orList, parseHttpMethod, quote, toString };
3422
+ export { ANSIStyles, type AssertMessageParameters, AsyncIterator, AsyncIteratorToJavascriptAsyncIteratorAdapter, AsyncResult, ByteList, ByteListStream, ByteReadStream, ByteWriteStream, Bytes, CharacterList, CharacterListStream, CharacterReadStream, CharacterReadStreamAsyncIterator, CharacterTable, CharacterWriteStream, CommandLineParameter, CommandLineParameters, Comparable, Comparer, Comparison, ConcatenateIterable, ConcatenateIterator, Condition, CurrentProcess, DateTime, Disposable, EmptyError, EqualFunctions, FetchHttpClient, FetchHttpIncomingResponse, FlatMapIterable, FlatMapIterator, Generator, type GeneratorControl, HttpClient, HttpHeader, HttpHeaders, HttpIncomingRequest, HttpIncomingResponse, HttpMethod, HttpOutgoingRequest, HttpOutgoingResponse, HttpServer, InMemoryCharacterWriteStream, IndentedCharacterWriteStream, Indexable, Iterable, Iterator, IteratorToJavascriptIteratorAdapter, JavascriptArrayList, JavascriptAsyncIterable, JavascriptAsyncIterator, JavascriptAsyncIteratorToAsyncIteratorAdapter, JavascriptIterable, JavascriptIterator, JavascriptIteratorResult, JavascriptIteratorToIteratorAdapter, JavascriptMapMap, JavascriptSetSet, List, ListQueue, ListStack, LuxonDateTime, Map, MapAsyncIterator, type MapEntry, MapIterable, MapIterator, MutableCondition, MutableHttpHeaders, MutableIndexable, MutableMap, Network, Node, NodeJSCharacterWriteStream, NodeJSHttpIncomingRequest, NodeJSHttpServer, NotFoundError, PostCondition, PostConditionError, PreCondition, PreConditionError, PromiseAsyncResult, Property, Queue, RealNetwork, RecreationDotGovClient, RecreationDotGovDivisionAvailability, type RecreationDotGovDivisionAvailabilityJson, type RecreationDotGovDivisionDayAvailability, type RecreationDotGovDivisionJson, RecreationDotGovError, type RecreationDotGovErrorResponse, type RecreationDotGovPermitItineraryJson, SearchControl, Set, SkipAsyncIterator, SkipIterator, Stack, StringComparer, StringIterator, SyncDisposable, SyncResult, TakeAsyncIterator, TakeIterator, ToStringFunctions, Type, WhereAsyncIterator, WhereIterable, WhereIterator, WonderlandTrailAvailability, type WonderlandTrailAvailabilityType, WonderlandTrailClient, WonderlandTrailConnection, WonderlandTrailConnections, WonderlandTrailDirection, WonderlandTrailItinerary, type WonderlandTrailLocation, WonderlandTrailLocations, WonderlandTrailReservationType, andList, depthFirstSearch, escape, escapeAndQuote, getLength, httpMethodToString, isDigit, isLetter, isLetterOrDigit, isLowercasedLetter, isMap, isMutableMap, isSet, isUppercasedLetter, isWhitespace, isWonderlandTrailLocation, join, orList, parseHttpMethod, quote, toString };
@@ -64,6 +64,7 @@ import {
64
64
  MapIterator,
65
65
  MutableCondition,
66
66
  MutableHttpHeaders,
67
+ MutableIndexable,
67
68
  MutableMap,
68
69
  Network,
69
70
  Node,
@@ -162,7 +163,7 @@ import {
162
163
  parseHttpMethod,
163
164
  quote,
164
165
  toString
165
- } from "./chunk-MMAX3IZF.js";
166
+ } from "./chunk-OYMWB5SX.js";
166
167
  export {
167
168
  ANSIStyles,
168
169
  AsyncIterator,
@@ -229,6 +230,7 @@ export {
229
230
  MapIterator,
230
231
  MutableCondition,
231
232
  MutableHttpHeaders,
233
+ MutableIndexable,
232
234
  MutableMap,
233
235
  Network,
234
236
  Node,