@chocbite/ts-lib-state 1.1.1 → 1.1.3

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.ts CHANGED
@@ -262,7 +262,7 @@ type EnumHelperEntry = {
262
262
  type StateEnumHelperList<K extends PropertyKey> = {
263
263
  [P in K]: EnumHelperEntry;
264
264
  };
265
- interface StateEnumRelated<L extends StateEnumHelperList<any>> extends StateRelatedBase {
265
+ interface StateEnumRelated<L extends StateEnumHelperList<any> = StateEnumHelperList<any>> extends StateRelatedBase {
266
266
  list: State<L>;
267
267
  map<K extends keyof L, R>(func: (key: K, val: EnumHelperEntry) => R): Promise<R[]>;
268
268
  }
@@ -275,21 +275,21 @@ declare class StateEnumHelper<L extends StateEnumHelperList<any>, K extends Prop
275
275
  related(): OptionSome<R>;
276
276
  }
277
277
 
278
- type SyncSetter<RT, RRT extends Result<RT, string>, REL extends Option<StateRelated>, WT = RT> = (value: WT, state: OwnerWrite$6<RT, RRT, WT, REL>, old?: RRT) => Promise<Result<void, string>>;
278
+ type SyncSetter<RT, RRT extends Result<RT, string>, REL extends Option<StateRelated>, WT = RT> = (value: WT, state: OwnerWrite$7<RT, RRT, WT, REL>, old?: RRT) => Promise<Result<void, string>>;
279
279
  interface Owner$c<RT, RRT extends Result<RT, string>, WT, REL extends Option<StateRelated>> {
280
280
  set(value: RRT): void;
281
281
  set_ok(value: RT): void;
282
282
  setter?: SyncSetter<RT, RRT, REL, WT>;
283
283
  readonly state: State<RT, WT, REL>;
284
284
  }
285
- interface OwnerWrite$6<RT, RRT extends Result<RT, string>, WT, REL extends Option<StateRelated>> extends Owner$c<RT, RRT, WT, REL> {
285
+ interface OwnerWrite$7<RT, RRT extends Result<RT, string>, WT, REL extends Option<StateRelated>> extends Owner$c<RT, RRT, WT, REL> {
286
286
  setter: SyncSetter<RT, RRT, REL, WT>;
287
287
  }
288
288
  type StateSyncROS<RT, REL extends Option<StateRelated> = Option<{}>, WT = any> = StateROS<RT, REL, WT> & Owner$c<RT, ResultOk<RT>, WT, REL> & {
289
289
  readonly read_only: StateROS<RT, REL, WT>;
290
290
  readonly read_write?: StateROSW<RT, WT, REL>;
291
291
  };
292
- type StateSyncROSW<RT, WT = RT, REL extends Option<StateRelated> = Option<{}>> = StateROSW<RT, WT, REL> & OwnerWrite$6<RT, ResultOk<RT>, WT, REL> & {
292
+ type StateSyncROSW<RT, WT = RT, REL extends Option<StateRelated> = Option<{}>> = StateROSW<RT, WT, REL> & OwnerWrite$7<RT, ResultOk<RT>, WT, REL> & {
293
293
  readonly read_only: StateROS<RT, REL, WT>;
294
294
  readonly read_write: StateROSW<RT, WT, REL>;
295
295
  };
@@ -298,7 +298,7 @@ type StateSyncRES<RT, REL extends Option<StateRelated> = Option<{}>, WT = any> =
298
298
  readonly read_only: StateRES<RT, REL, WT>;
299
299
  readonly read_write?: StateRESW<RT, WT, REL>;
300
300
  };
301
- type StateSyncRESW<RT, WT = RT, REL extends Option<StateRelated> = Option<{}>> = StateRESW<RT, WT, REL> & OwnerWrite$6<RT, Result<RT, string>, WT, REL> & {
301
+ type StateSyncRESW<RT, WT = RT, REL extends Option<StateRelated> = Option<{}>> = StateRESW<RT, WT, REL> & OwnerWrite$7<RT, Result<RT, string>, WT, REL> & {
302
302
  set_err(error: string): void;
303
303
  readonly read_only: StateRES<RT, REL, WT>;
304
304
  readonly read_write: StateRESW<RT, WT, REL>;
@@ -408,7 +408,7 @@ type StateResourceFuncREA<RT, REL extends Option<StateRelated> = Option<{}>, WT
408
408
  * @template RT - The type of the state’s value when read.
409
409
  * @template WT - The type which can be written to the state.
410
410
  * @template REL - The type of related states, defaults to an empty object.*/
411
- interface StateResourceOwnerREAWA<RT, WT, REL extends Option<StateRelated>> {
411
+ interface StateResourceOwnerREAW<RT, WT, REL extends Option<StateRelated>> {
412
412
  /**Updates the resource and fulfills all promises for value
413
413
  * @param update if true, also updates the buffer and notifies subscribers, otherwise only fulfills the promises for single gets*/
414
414
  update_single(value: Result<RT, string>, update?: boolean): void;
@@ -419,7 +419,7 @@ interface StateResourceOwnerREAWA<RT, WT, REL extends Option<StateRelated>> {
419
419
  get read_only(): StateREA<RT, REL, WT>;
420
420
  get read_write(): StateREAW<RT, WT, REL>;
421
421
  }
422
- declare abstract class StateResourceREAWA<RT, WT = RT, REL extends Option<StateRelated> = Option<{}>> extends StateBase<RT, WT, REL, Result<RT, string>> implements StateResourceOwnerREAWA<RT, WT, REL> {
422
+ declare abstract class StateResourceREAW<RT, WT = RT, REL extends Option<StateRelated> = Option<{}>> extends StateBase<RT, WT, REL, Result<RT, string>> implements StateResourceOwnerREAW<RT, WT, REL> {
423
423
  #private;
424
424
  /**Timeout before giving generic error, if update_resource is not called*/
425
425
  abstract get timeout(): number;
@@ -434,13 +434,13 @@ declare abstract class StateResourceREAWA<RT, WT = RT, REL extends Option<StateR
434
434
  protected on_subscribe(): void;
435
435
  protected on_unsubscribe(): void;
436
436
  /**Called if the state is awaited, returns the value once*/
437
- protected abstract single_get(state: StateResourceOwnerREAWA<RT, WT, REL>): void;
437
+ protected abstract single_get(state: StateResourceOwnerREAW<RT, WT, REL>): void;
438
438
  /**Called when state is subscribed to to setup connection to remote resource*/
439
- protected abstract setup_connection(state: StateResourceOwnerREAWA<RT, WT, REL>): void;
439
+ protected abstract setup_connection(state: StateResourceOwnerREAW<RT, WT, REL>): void;
440
440
  /**Called when state is no longer subscribed to to cleanup connection to remote resource*/
441
- protected abstract teardown_connection(state: StateResourceOwnerREAWA<RT, WT, REL>): void;
441
+ protected abstract teardown_connection(state: StateResourceOwnerREAW<RT, WT, REL>): void;
442
442
  /**Called after write debounce finished with the last written value*/
443
- protected abstract write_action(value: WT, state: StateResourceOwnerREAWA<RT, WT, REL>): Promise<Result<void, string>>;
443
+ protected abstract write_action(value: WT, state: StateResourceOwnerREAW<RT, WT, REL>): Promise<Result<void, string>>;
444
444
  update_single(value: Result<RT, string>, update?: boolean): void;
445
445
  update_resource(value: Result<RT, string>): void;
446
446
  get buffer(): Result<RT, string> | undefined;
@@ -456,9 +456,9 @@ declare abstract class StateResourceREAWA<RT, WT = RT, REL extends Option<StateR
456
456
  abstract limit(value: WT): Promise<Result<WT, string>>;
457
457
  abstract check(value: WT): Promise<Result<WT, string>>;
458
458
  }
459
- interface OwnerWA<RT, WT, REL extends Option<StateRelated>> extends StateResourceOwnerREAWA<RT, WT, REL> {
459
+ interface OwnerWrite$6<RT, WT, REL extends Option<StateRelated>> extends StateResourceOwnerREAW<RT, WT, REL> {
460
460
  }
461
- type StateResourceFuncREAWA<RT, REL extends Option<StateRelated> = Option<{}>, WT = any> = StateREAW<RT, WT, REL> & OwnerWA<RT, WT, REL>;
461
+ type StateResourceFuncREAW<RT, REL extends Option<StateRelated> = Option<{}>, WT = any> = StateREAW<RT, WT, REL> & OwnerWrite$6<RT, WT, REL>;
462
462
 
463
463
  /**State Resource
464
464
  * state for representing a remote resource
@@ -1261,14 +1261,14 @@ declare const state: {
1261
1261
  class: typeof StateResourceREA;
1262
1262
  };
1263
1263
  rea_wa: {
1264
- from<RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>, WT = RT>(once: (state: OwnerWA<RT, WT, REL>) => void, setup: (state: OwnerWA<RT, WT, REL>) => void, teardown: () => void, write_action?: (value: WT, state: OwnerWA<RT, WT, REL>) => Promise<_chocbite_ts_lib_result.Result<void, string>>, times?: {
1264
+ from<RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>, WT = RT>(once: (state: OwnerWrite$6<RT, WT, REL>) => void, setup: (state: OwnerWrite$6<RT, WT, REL>) => void, teardown: () => void, write_action?: (value: WT, state: OwnerWrite$6<RT, WT, REL>) => Promise<_chocbite_ts_lib_result.Result<void, string>>, times?: {
1265
1265
  timeout?: number;
1266
1266
  debounce?: number;
1267
1267
  validity?: number | true;
1268
1268
  retention?: number;
1269
1269
  write_debounce?: number;
1270
- }, helper?: StateHelper<WT, REL>): StateResourceFuncREAWA<RT, REL, WT>;
1271
- class: typeof StateResourceREAWA;
1270
+ }, helper?: StateHelper<WT, REL>): StateResourceFuncREAW<RT, REL, WT>;
1271
+ class: typeof StateResourceREAW;
1272
1272
  };
1273
1273
  };
1274
1274
  s: {
@@ -1277,8 +1277,8 @@ declare const state: {
1277
1277
  result<RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>, WT = any>(init: _chocbite_ts_lib_result.ResultOk<RT>, helper?: StateHelper<WT, REL>): StateSyncROS<RT, REL, WT>;
1278
1278
  };
1279
1279
  ros_ws: {
1280
- ok<RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(this: void, init: RT, setter?: ((value: WT, state: OwnerWrite$6<RT, _chocbite_ts_lib_result.ResultOk<RT>, WT, REL>, old?: _chocbite_ts_lib_result.ResultOk<RT> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>): StateSyncROSW<RT, WT, REL>;
1281
- result<RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(init: _chocbite_ts_lib_result.ResultOk<RT>, setter?: ((value: WT, state: OwnerWrite$6<RT, _chocbite_ts_lib_result.ResultOk<RT>, WT, REL>, old?: _chocbite_ts_lib_result.ResultOk<RT> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>): StateSyncROSW<RT, WT, REL>;
1280
+ ok<RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(this: void, init: RT, setter?: ((value: WT, state: OwnerWrite$7<RT, _chocbite_ts_lib_result.ResultOk<RT>, WT, REL>, old?: _chocbite_ts_lib_result.ResultOk<RT> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>): StateSyncROSW<RT, WT, REL>;
1281
+ result<RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(init: _chocbite_ts_lib_result.ResultOk<RT>, setter?: ((value: WT, state: OwnerWrite$7<RT, _chocbite_ts_lib_result.ResultOk<RT>, WT, REL>, old?: _chocbite_ts_lib_result.ResultOk<RT> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>): StateSyncROSW<RT, WT, REL>;
1282
1282
  };
1283
1283
  res: {
1284
1284
  ok<RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>, WT = any>(this: void, init: RT, helper?: StateHelper<WT, REL>): StateSyncRES<RT, REL, WT>;
@@ -1286,9 +1286,9 @@ declare const state: {
1286
1286
  result<RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>, WT = any>(init: _chocbite_ts_lib_result.Result<RT, string>, helper?: StateHelper<WT, REL>): StateSyncRES<RT, REL, WT>;
1287
1287
  };
1288
1288
  res_ws: {
1289
- ok<RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(this: void, init: RT, setter?: ((value: WT, state: OwnerWrite$6<RT, _chocbite_ts_lib_result.Result<RT, string>, WT, REL>, old?: _chocbite_ts_lib_result.Result<RT, string> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>): StateSyncRESW<RT, WT, REL>;
1290
- err<RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(this: void, init: string, setter?: ((value: WT, state: OwnerWrite$6<RT, _chocbite_ts_lib_result.Result<RT, string>, WT, REL>, old?: _chocbite_ts_lib_result.Result<RT, string> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>): StateSyncRESW<RT, WT, REL>;
1291
- result<RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(init: _chocbite_ts_lib_result.Result<RT, string>, setter?: ((value: WT, state: OwnerWrite$6<RT, _chocbite_ts_lib_result.Result<RT, string>, WT, REL>, old?: _chocbite_ts_lib_result.Result<RT, string> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>): StateSyncRESW<RT, WT, REL>;
1289
+ ok<RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(this: void, init: RT, setter?: ((value: WT, state: OwnerWrite$7<RT, _chocbite_ts_lib_result.Result<RT, string>, WT, REL>, old?: _chocbite_ts_lib_result.Result<RT, string> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>): StateSyncRESW<RT, WT, REL>;
1290
+ err<RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(this: void, init: string, setter?: ((value: WT, state: OwnerWrite$7<RT, _chocbite_ts_lib_result.Result<RT, string>, WT, REL>, old?: _chocbite_ts_lib_result.Result<RT, string> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>): StateSyncRESW<RT, WT, REL>;
1291
+ result<RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(init: _chocbite_ts_lib_result.Result<RT, string>, setter?: ((value: WT, state: OwnerWrite$7<RT, _chocbite_ts_lib_result.Result<RT, string>, WT, REL>, old?: _chocbite_ts_lib_result.Result<RT, string> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>): StateSyncRESW<RT, WT, REL>;
1292
1292
  };
1293
1293
  };
1294
1294
  /**Returns true if the given object promises to be a state */
@@ -1298,9 +1298,9 @@ declare const state: {
1298
1298
  ok: <RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>, WT = any>(this: void, init: RT, helper?: StateHelper<WT, REL>) => StateSyncROS<RT, REL, WT>;
1299
1299
  err: <RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>, WT = any>(this: void, init: string, helper?: StateHelper<WT, REL>) => StateSyncRES<RT, REL, WT>;
1300
1300
  from: <RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>, WT = any>(this: void, init: RT, helper?: StateHelper<WT, REL>) => StateSyncRES<RT, REL, WT>;
1301
- ok_ws: <RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(this: void, init: RT, setter?: ((value: WT, state: OwnerWrite$6<RT, _chocbite_ts_lib_result.ResultOk<RT>, WT, REL>, old?: _chocbite_ts_lib_result.ResultOk<RT> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>) => StateSyncROSW<RT, WT, REL>;
1302
- err_ws: <RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(this: void, init: string, setter?: ((value: WT, state: OwnerWrite$6<RT, _chocbite_ts_lib_result.Result<RT, string>, WT, REL>, old?: _chocbite_ts_lib_result.Result<RT, string> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>) => StateSyncRESW<RT, WT, REL>;
1303
- from_ws: <RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(this: void, init: RT, setter?: ((value: WT, state: OwnerWrite$6<RT, _chocbite_ts_lib_result.Result<RT, string>, WT, REL>, old?: _chocbite_ts_lib_result.Result<RT, string> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>) => StateSyncRESW<RT, WT, REL>;
1301
+ ok_ws: <RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(this: void, init: RT, setter?: ((value: WT, state: OwnerWrite$7<RT, _chocbite_ts_lib_result.ResultOk<RT>, WT, REL>, old?: _chocbite_ts_lib_result.ResultOk<RT> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>) => StateSyncROSW<RT, WT, REL>;
1302
+ err_ws: <RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(this: void, init: string, setter?: ((value: WT, state: OwnerWrite$7<RT, _chocbite_ts_lib_result.Result<RT, string>, WT, REL>, old?: _chocbite_ts_lib_result.Result<RT, string> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>) => StateSyncRESW<RT, WT, REL>;
1303
+ from_ws: <RT, WT = RT, REL extends _chocbite_ts_lib_result.Option<StateRelated> = _chocbite_ts_lib_result.Option<{}>>(this: void, init: RT, setter?: ((value: WT, state: OwnerWrite$7<RT, _chocbite_ts_lib_result.Result<RT, string>, WT, REL>, old?: _chocbite_ts_lib_result.Result<RT, string> | undefined) => Promise<_chocbite_ts_lib_result.Result<void, string>>) | true, helper?: StateHelper<WT, REL>) => StateSyncRESW<RT, WT, REL>;
1304
1304
  };
1305
1305
 
1306
- export { type State, type StateArray, type StateArrayREA, type StateArrayREAW, type StateArrayRES, type StateArrayRESW, type StateArrayROA, type StateArrayROAW, type StateArrayROS, type StateArrayROSW, type StateArrayRead, StateArrayReadType, type StateArraySyncRES, type StateArraySyncRESWS, type StateArraySyncROS, type StateArraySyncROSWS, type StateArrayWrite, type StateCollectedREA, type StateCollectedRES, type StateCollectedROA, type StateCollectedROS, type StateDelayedREA, type StateDelayedREAW, type StateDelayedROA, type StateDelayedROAW, StateEnumHelper, type StateEnumRelated, type StateInferResult, type StateInferSub, type StateInferType, type StateLazyRES, type StateLazyRESW as StateLazyRESWS, type StateLazyROS, type StateLazyROSW as StateLazyROSWS, StateNumberHelper, type StateNumberRelated, type StateProxyREA, type StateProxyREAW as StateProxyREAWA, type StateProxyRES, type StateProxyRESW as StateProxyRESWA, type StateProxyROA, type StateProxyROAW as StateProxyROAWA, type StateProxyROS, type StateProxyROSW as StateProxyROSWA, type StateREA, type StateREAW, type StateRES, type StateRESW, type StateROA, type StateROAW, type StateROS, type StateROSW, type StateResourceFuncREA, type StateResourceFuncREAWA, type StateResourceFuncROA, StateResourceREA, StateResourceREAWA, StateResourceROA, StateStringHelper, type StateStringRelated, type StateSub, type StateSyncRES, type StateSyncRESW as StateSyncRESWS, type StateSyncROS, type StateSyncROSW as StateSyncROSWS, state as default, state };
1306
+ export { type State, type StateArray, type StateArrayREA, type StateArrayREAW, type StateArrayRES, type StateArrayRESW, type StateArrayROA, type StateArrayROAW, type StateArrayROS, type StateArrayROSW, type StateArrayRead, StateArrayReadType, type StateArraySyncRES, type StateArraySyncRESWS, type StateArraySyncROS, type StateArraySyncROSWS, type StateArrayWrite, type StateCollectedREA, type StateCollectedRES, type StateCollectedROA, type StateCollectedROS, type StateDelayedREA, type StateDelayedREAW, type StateDelayedROA, type StateDelayedROAW, StateEnumHelper, type StateEnumRelated, type StateInferResult, type StateInferSub, type StateInferType, type StateLazyRES, type StateLazyRESW as StateLazyRESWS, type StateLazyROS, type StateLazyROSW as StateLazyROSWS, StateNumberHelper, type StateNumberRelated, type StateProxyREA, type StateProxyREAW, type StateProxyRES, type StateProxyRESW, type StateProxyROA, type StateProxyROAW, type StateProxyROS, type StateProxyROSW, type StateREA, type StateREAW, type StateRES, type StateRESW, type StateROA, type StateROAW, type StateROS, type StateROSW, type StateResourceFuncREA, type StateResourceFuncREAW, type StateResourceFuncROA, StateResourceREA, StateResourceREAW, StateResourceROA, StateStringHelper, type StateStringRelated, type StateSub, type StateSyncRES, type StateSyncRESW, type StateSyncROS, type StateSyncROSW, state as default, state };
package/dist/index.js CHANGED
@@ -2938,7 +2938,7 @@ var rea2 = {
2938
2938
  },
2939
2939
  class: StateResourceREA
2940
2940
  };
2941
- var StateResourceREAWA = class extends StateBase {
2941
+ var StateResourceREAW = class extends StateBase {
2942
2942
  #valid = 0;
2943
2943
  #fetching = false;
2944
2944
  #buffer;
@@ -3054,7 +3054,7 @@ var StateResourceREAWA = class extends StateBase {
3054
3054
  });
3055
3055
  }
3056
3056
  };
3057
- var FuncREAWA = class extends StateResourceREAWA {
3057
+ var FuncREAW = class extends StateResourceREAW {
3058
3058
  constructor(once, setup, teardown, timeout, debounce, validity, retention, write_debounce, write_action, helper) {
3059
3059
  super();
3060
3060
  this.single_get = once;
@@ -3112,7 +3112,7 @@ var rea_wa = {
3112
3112
  * @param write_debounce debounce delay for write calls, only the last write within the delay is used
3113
3113
  * */
3114
3114
  from(once, setup, teardown, write_action, times, helper) {
3115
- return new FuncREAWA(
3115
+ return new FuncREAW(
3116
3116
  once,
3117
3117
  setup,
3118
3118
  teardown,
@@ -3125,7 +3125,7 @@ var rea_wa = {
3125
3125
  helper
3126
3126
  );
3127
3127
  },
3128
- class: StateResourceREAWA
3128
+ class: StateResourceREAW
3129
3129
  };
3130
3130
  var STATE_RESOURCE_REA = {
3131
3131
  /**Remote resource */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chocbite/ts-lib-state",
3
- "version": "1.1.1",
3
+ "version": "1.1.3",
4
4
  "description": "State management library for TypeScript",
5
5
  "author": "chocolateandmilkwin",
6
6
  "license": "MIT",
@@ -25,21 +25,23 @@
25
25
  "build": "tsup src/index.ts --format esm --dts",
26
26
  "lint": "eslint src/**/*.ts",
27
27
  "test": "vitest run",
28
- "prepublishOnly": "npm run build"
28
+ "prepublishOnly": "npm run build",
29
+ "upgrades": "npx npm-check-updates",
30
+ "upgrade": "npx npm-check-updates -u && npm install"
29
31
  },
30
32
  "devDependencies": {
31
- "@vitest/browser-playwright": "^4.0.0",
32
- "eslint": "^9.0.0",
33
- "tsup": "^8.0.0",
34
- "typescript": "^5.0.0",
35
- "typescript-eslint": "^8.0.0",
36
- "vite": "^7.0.0",
37
- "vitest": "^4.0.0",
33
+ "@vitest/browser-playwright": "^4.1.0",
34
+ "eslint": "^10.0.3",
35
+ "tsup": "^8.5.1",
36
+ "typescript": "^5.9.3",
37
+ "typescript-eslint": "^8.57.1",
38
+ "vite": "^8.0.1",
39
+ "vitest": "^4.1.0",
38
40
  "@chocbite/ts-lib-common": "^1.0.0"
39
41
  },
40
42
  "dependencies": {
41
43
  "@chocbite/ts-lib-math": "^1.0.0",
42
44
  "@chocbite/ts-lib-result": "^1.0.0",
43
- "@chocbite/ts-lib-svg": "^1.0.0"
45
+ "@chocbite/ts-lib-svg": "^1.0.1"
44
46
  }
45
47
  }