@axi-engine/utils 0.2.1 → 0.2.2
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/dist/index.d.mts +23 -1
- package/dist/index.d.ts +23 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -205,6 +205,28 @@ declare class ConstructorRegistry<T> {
|
|
|
205
205
|
clear(): void;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
+
/**
|
|
209
|
+
* A read-only contract for any system that can provide data by path.
|
|
210
|
+
*/
|
|
211
|
+
interface DataSource {
|
|
212
|
+
get(path: PathType): unknown;
|
|
213
|
+
has(path: PathType): boolean;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* A write-only contract for any system that can accept data by path.
|
|
217
|
+
*/
|
|
218
|
+
interface DataSink {
|
|
219
|
+
set(path: PathType, value: unknown): void;
|
|
220
|
+
create(path: PathType, value: unknown): void;
|
|
221
|
+
delete(path: PathType): void;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* A full CRUD contract for systems that provide complete data management.
|
|
225
|
+
* Combines both reading and writing capabilities.
|
|
226
|
+
*/
|
|
227
|
+
interface DataStorage extends DataSource, DataSink {
|
|
228
|
+
}
|
|
229
|
+
|
|
208
230
|
/**
|
|
209
231
|
* A minimal, type-safe event emitter for a single event.
|
|
210
232
|
* It does not manage state, it only manages subscribers and event dispatching.
|
|
@@ -302,4 +324,4 @@ declare function randInt(min: number, max: number): number;
|
|
|
302
324
|
*/
|
|
303
325
|
declare function randId(): string;
|
|
304
326
|
|
|
305
|
-
export { type AxiEngineConfig, type Constructor, ConstructorRegistry, Emitter, type PathType, type ScalarType, type Subscribable, areArraysEqual, axiSettings, clampNumber, configure, ensurePathArray, ensurePathString, firstKeyOf, genArray, getPercentOf, getRandomElement, haveSameElements, isBoolean, isNull, isNullOrUndefined, isNumber, isPercentageString, isScalar, isSequentialStart, isString, isUndefined, last, randId, randInt, shuffleArray, throwIf, throwIfEmpty, unique };
|
|
327
|
+
export { type AxiEngineConfig, type Constructor, ConstructorRegistry, type DataSink, type DataSource, type DataStorage, Emitter, type PathType, type ScalarType, type Subscribable, areArraysEqual, axiSettings, clampNumber, configure, ensurePathArray, ensurePathString, firstKeyOf, genArray, getPercentOf, getRandomElement, haveSameElements, isBoolean, isNull, isNullOrUndefined, isNumber, isPercentageString, isScalar, isSequentialStart, isString, isUndefined, last, randId, randInt, shuffleArray, throwIf, throwIfEmpty, unique };
|
package/dist/index.d.ts
CHANGED
|
@@ -205,6 +205,28 @@ declare class ConstructorRegistry<T> {
|
|
|
205
205
|
clear(): void;
|
|
206
206
|
}
|
|
207
207
|
|
|
208
|
+
/**
|
|
209
|
+
* A read-only contract for any system that can provide data by path.
|
|
210
|
+
*/
|
|
211
|
+
interface DataSource {
|
|
212
|
+
get(path: PathType): unknown;
|
|
213
|
+
has(path: PathType): boolean;
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* A write-only contract for any system that can accept data by path.
|
|
217
|
+
*/
|
|
218
|
+
interface DataSink {
|
|
219
|
+
set(path: PathType, value: unknown): void;
|
|
220
|
+
create(path: PathType, value: unknown): void;
|
|
221
|
+
delete(path: PathType): void;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* A full CRUD contract for systems that provide complete data management.
|
|
225
|
+
* Combines both reading and writing capabilities.
|
|
226
|
+
*/
|
|
227
|
+
interface DataStorage extends DataSource, DataSink {
|
|
228
|
+
}
|
|
229
|
+
|
|
208
230
|
/**
|
|
209
231
|
* A minimal, type-safe event emitter for a single event.
|
|
210
232
|
* It does not manage state, it only manages subscribers and event dispatching.
|
|
@@ -302,4 +324,4 @@ declare function randInt(min: number, max: number): number;
|
|
|
302
324
|
*/
|
|
303
325
|
declare function randId(): string;
|
|
304
326
|
|
|
305
|
-
export { type AxiEngineConfig, type Constructor, ConstructorRegistry, Emitter, type PathType, type ScalarType, type Subscribable, areArraysEqual, axiSettings, clampNumber, configure, ensurePathArray, ensurePathString, firstKeyOf, genArray, getPercentOf, getRandomElement, haveSameElements, isBoolean, isNull, isNullOrUndefined, isNumber, isPercentageString, isScalar, isSequentialStart, isString, isUndefined, last, randId, randInt, shuffleArray, throwIf, throwIfEmpty, unique };
|
|
327
|
+
export { type AxiEngineConfig, type Constructor, ConstructorRegistry, type DataSink, type DataSource, type DataStorage, Emitter, type PathType, type ScalarType, type Subscribable, areArraysEqual, axiSettings, clampNumber, configure, ensurePathArray, ensurePathString, firstKeyOf, genArray, getPercentOf, getRandomElement, haveSameElements, isBoolean, isNull, isNullOrUndefined, isNumber, isPercentageString, isScalar, isSequentialStart, isString, isUndefined, last, randId, randInt, shuffleArray, throwIf, throwIfEmpty, unique };
|
package/package.json
CHANGED