synstate 3.0.6 → 3.1.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.
Files changed (172) hide show
  1. package/dist/core/base/create-observable-base.d.mts +2 -2
  2. package/dist/core/base/create-observable-base.d.mts.map +1 -1
  3. package/dist/core/base/create-observable-base.mjs.map +1 -1
  4. package/dist/core/base/create-root-observable.d.mts +1 -1
  5. package/dist/core/base/create-root-observable.d.mts.map +1 -1
  6. package/dist/core/combine/combine.d.mts +2 -2
  7. package/dist/core/combine/combine.d.mts.map +1 -1
  8. package/dist/core/combine/merge.d.mts +2 -2
  9. package/dist/core/combine/merge.d.mts.map +1 -1
  10. package/dist/core/combine/zip.d.mts +2 -2
  11. package/dist/core/combine/zip.d.mts.map +1 -1
  12. package/dist/core/create/counter.d.mts +1 -1
  13. package/dist/core/create/counter.d.mts.map +1 -1
  14. package/dist/core/create/from-abortable-promise.d.mts +1 -1
  15. package/dist/core/create/from-abortable-promise.d.mts.map +1 -1
  16. package/dist/core/create/from-promise.d.mts +1 -1
  17. package/dist/core/create/from-promise.d.mts.map +1 -1
  18. package/dist/core/create/from-subscribable.d.mts +1 -1
  19. package/dist/core/create/from-subscribable.d.mts.map +1 -1
  20. package/dist/core/create/just.d.mts +1 -1
  21. package/dist/core/create/just.d.mts.map +1 -1
  22. package/dist/core/create/source.d.mts +1 -1
  23. package/dist/core/create/source.d.mts.map +1 -1
  24. package/dist/core/create/timer.d.mts +1 -1
  25. package/dist/core/create/timer.d.mts.map +1 -1
  26. package/dist/core/operators/audit.d.mts +1 -1
  27. package/dist/core/operators/audit.d.mts.map +1 -1
  28. package/dist/core/operators/debounce.d.mts +1 -1
  29. package/dist/core/operators/debounce.d.mts.map +1 -1
  30. package/dist/core/operators/filter.d.mts +1 -1
  31. package/dist/core/operators/filter.d.mts.map +1 -1
  32. package/dist/core/operators/map.d.mts +1 -1
  33. package/dist/core/operators/map.d.mts.map +1 -1
  34. package/dist/core/operators/merge-map.d.mts +1 -1
  35. package/dist/core/operators/merge-map.d.mts.map +1 -1
  36. package/dist/core/operators/pairwise.d.mts +2 -2
  37. package/dist/core/operators/pairwise.d.mts.map +1 -1
  38. package/dist/core/operators/scan.d.mts +1 -1
  39. package/dist/core/operators/scan.d.mts.map +1 -1
  40. package/dist/core/operators/skip-if-no-change.d.mts +1 -1
  41. package/dist/core/operators/skip-if-no-change.d.mts.map +1 -1
  42. package/dist/core/operators/skip-until.d.mts +1 -1
  43. package/dist/core/operators/skip-until.d.mts.map +1 -1
  44. package/dist/core/operators/skip-while.d.mts +1 -1
  45. package/dist/core/operators/skip-while.d.mts.map +1 -1
  46. package/dist/core/operators/switch-map.d.mts +1 -1
  47. package/dist/core/operators/switch-map.d.mts.map +1 -1
  48. package/dist/core/operators/take-until.d.mts +1 -1
  49. package/dist/core/operators/take-until.d.mts.map +1 -1
  50. package/dist/core/operators/take-while.d.mts +1 -1
  51. package/dist/core/operators/take-while.d.mts.map +1 -1
  52. package/dist/core/operators/throttle.d.mts +1 -1
  53. package/dist/core/operators/throttle.d.mts.map +1 -1
  54. package/dist/core/operators/with-buffered-from.d.mts +1 -1
  55. package/dist/core/operators/with-buffered-from.d.mts.map +1 -1
  56. package/dist/core/operators/with-current-value-from.d.mts +1 -1
  57. package/dist/core/operators/with-current-value-from.d.mts.map +1 -1
  58. package/dist/core/operators/with-initial-value.d.mts +1 -1
  59. package/dist/core/operators/with-initial-value.d.mts.map +1 -1
  60. package/dist/core/predefined/operators/attach-index.d.mts +2 -2
  61. package/dist/core/predefined/operators/attach-index.d.mts.map +1 -1
  62. package/dist/core/predefined/operators/map-optional.d.mts +1 -1
  63. package/dist/core/predefined/operators/map-optional.d.mts.map +1 -1
  64. package/dist/core/predefined/operators/map-result-err.d.mts +1 -1
  65. package/dist/core/predefined/operators/map-result-err.d.mts.map +1 -1
  66. package/dist/core/predefined/operators/map-result-ok.d.mts +1 -1
  67. package/dist/core/predefined/operators/map-result-ok.d.mts.map +1 -1
  68. package/dist/core/predefined/operators/map-to.d.mts +1 -1
  69. package/dist/core/predefined/operators/map-to.d.mts.map +1 -1
  70. package/dist/core/predefined/operators/pluck.d.mts +1 -1
  71. package/dist/core/predefined/operators/pluck.d.mts.map +1 -1
  72. package/dist/core/predefined/operators/skip.d.mts +2 -2
  73. package/dist/core/predefined/operators/skip.d.mts.map +1 -1
  74. package/dist/core/predefined/operators/take.d.mts +2 -2
  75. package/dist/core/predefined/operators/take.d.mts.map +1 -1
  76. package/dist/core/predefined/operators/unwrap-optional.d.mts +1 -1
  77. package/dist/core/predefined/operators/unwrap-optional.d.mts.map +1 -1
  78. package/dist/core/predefined/operators/unwrap-result-err.d.mts +1 -1
  79. package/dist/core/predefined/operators/unwrap-result-err.d.mts.map +1 -1
  80. package/dist/core/predefined/operators/unwrap-result-ok.d.mts +1 -1
  81. package/dist/core/predefined/operators/unwrap-result-ok.d.mts.map +1 -1
  82. package/dist/core/types/id.d.mts +1 -1
  83. package/dist/core/types/id.d.mts.map +1 -1
  84. package/dist/core/types/observable-family.d.mts +3 -3
  85. package/dist/core/types/observable-family.d.mts.map +1 -1
  86. package/dist/core/types/observable-kind.d.mts +1 -1
  87. package/dist/core/types/observable-kind.d.mts.map +1 -1
  88. package/dist/core/types/observable.d.mts +4 -4
  89. package/dist/core/types/observable.d.mts.map +1 -1
  90. package/dist/core/types/types.d.mts +1 -1
  91. package/dist/core/types/types.d.mts.map +1 -1
  92. package/dist/core/utils/id-maker.d.mts +1 -1
  93. package/dist/core/utils/id-maker.d.mts.map +1 -1
  94. package/dist/core/utils/max-depth.d.mts +1 -1
  95. package/dist/core/utils/max-depth.d.mts.map +1 -1
  96. package/dist/core/utils/observable-utils.d.mts +1 -1
  97. package/dist/core/utils/observable-utils.d.mts.map +1 -1
  98. package/dist/core/utils/utils.d.mts +1 -1
  99. package/dist/core/utils/utils.d.mts.map +1 -1
  100. package/dist/utils/collect-to-array.d.mts +1 -1
  101. package/dist/utils/collect-to-array.d.mts.map +1 -1
  102. package/dist/utils/create-boolean-state.d.mts +17 -14
  103. package/dist/utils/create-boolean-state.d.mts.map +1 -1
  104. package/dist/utils/create-boolean-state.mjs +4 -2
  105. package/dist/utils/create-boolean-state.mjs.map +1 -1
  106. package/dist/utils/create-reducer.d.mts +49 -2
  107. package/dist/utils/create-reducer.d.mts.map +1 -1
  108. package/dist/utils/create-reducer.mjs +31 -2
  109. package/dist/utils/create-reducer.mjs.map +1 -1
  110. package/dist/utils/create-state.d.mts +37 -2
  111. package/dist/utils/create-state.d.mts.map +1 -1
  112. package/dist/utils/create-state.mjs +36 -2
  113. package/dist/utils/create-state.mjs.map +1 -1
  114. package/package.json +11 -11
  115. package/src/core/base/create-child-observable.mts +1 -1
  116. package/src/core/base/create-observable-base.mts +14 -18
  117. package/src/core/base/create-root-observable.mts +1 -1
  118. package/src/core/base/observable-base.test.mts +7 -7
  119. package/src/core/combine/combine.mts +10 -10
  120. package/src/core/combine/merge.mts +8 -8
  121. package/src/core/combine/zip.mts +11 -11
  122. package/src/core/create/counter.mts +1 -1
  123. package/src/core/create/from-abortable-promise.mts +1 -1
  124. package/src/core/create/from-promise.mts +1 -1
  125. package/src/core/create/from-subscribable.mts +3 -3
  126. package/src/core/create/just.mts +1 -1
  127. package/src/core/create/source.mts +3 -3
  128. package/src/core/create/timer.mts +1 -1
  129. package/src/core/operators/audit.mts +5 -5
  130. package/src/core/operators/debounce.mts +5 -5
  131. package/src/core/operators/filter.mts +5 -5
  132. package/src/core/operators/map.mts +5 -5
  133. package/src/core/operators/merge-map.mts +5 -5
  134. package/src/core/operators/pairwise.mts +5 -5
  135. package/src/core/operators/scan.mts +4 -4
  136. package/src/core/operators/skip-if-no-change.mts +4 -4
  137. package/src/core/operators/skip-until.mts +4 -4
  138. package/src/core/operators/skip-while.mts +4 -4
  139. package/src/core/operators/switch-map.mts +5 -5
  140. package/src/core/operators/take-until.mts +4 -4
  141. package/src/core/operators/take-while.mts +5 -5
  142. package/src/core/operators/throttle.mts +5 -5
  143. package/src/core/operators/with-buffered-from.mts +4 -4
  144. package/src/core/operators/with-current-value-from.mts +4 -4
  145. package/src/core/operators/with-initial-value.mts +5 -5
  146. package/src/core/predefined/operators/attach-index.mts +2 -2
  147. package/src/core/predefined/operators/map-optional.mts +1 -1
  148. package/src/core/predefined/operators/map-result-err.mts +1 -1
  149. package/src/core/predefined/operators/map-result-ok.mts +1 -1
  150. package/src/core/predefined/operators/map-to.mts +1 -1
  151. package/src/core/predefined/operators/pluck.mts +1 -1
  152. package/src/core/predefined/operators/skip.mts +2 -2
  153. package/src/core/predefined/operators/take.mts +2 -2
  154. package/src/core/predefined/operators/unwrap-optional.mts +2 -2
  155. package/src/core/predefined/operators/unwrap-result-err.mts +2 -2
  156. package/src/core/predefined/operators/unwrap-result-ok.mts +2 -2
  157. package/src/core/types/id.mts +1 -1
  158. package/src/core/types/observable-family.mts +15 -15
  159. package/src/core/types/observable-kind.mts +1 -1
  160. package/src/core/types/observable.mts +4 -4
  161. package/src/core/types/types.mts +1 -1
  162. package/src/core/utils/id-maker.mts +4 -4
  163. package/src/core/utils/max-depth.mts +1 -1
  164. package/src/core/utils/observable-utils.mts +1 -1
  165. package/src/core/utils/utils.mts +1 -1
  166. package/src/utils/collect-to-array.mts +1 -1
  167. package/src/utils/create-boolean-state.mts +18 -14
  168. package/src/utils/create-boolean-state.test.mts +23 -0
  169. package/src/utils/create-reducer.mts +59 -2
  170. package/src/utils/create-reducer.test.mts +87 -0
  171. package/src/utils/create-state.mts +38 -2
  172. package/src/utils/create-state.test.mts +72 -0
@@ -1,23 +1,19 @@
1
1
  import { Arr, Optional } from 'ts-data-forge';
2
2
  import { unreachable } from 'ts-std-forge';
3
- import {
4
- type MutableMap,
5
- type MutableSet,
6
- type ReadonlyRecord,
7
- } from 'ts-type-forge';
8
- import {
9
- type ChildObservable,
10
- type InitializedObservable,
11
- type Observable,
12
- type ObservableBase,
13
- type ObservableId,
14
- type ObservableKind,
15
- type Operator,
16
- type Subscriber,
17
- type SubscriberId,
18
- type Subscription,
19
- type UpdateToken,
20
- type WithInitialValueOperator,
3
+ import type { MutableMap, MutableSet, ReadonlyRecord } from 'ts-type-forge';
4
+ import type {
5
+ ChildObservable,
6
+ InitializedObservable,
7
+ Observable,
8
+ ObservableBase,
9
+ ObservableId,
10
+ ObservableKind,
11
+ Operator,
12
+ Subscriber,
13
+ SubscriberId,
14
+ Subscription,
15
+ UpdateToken,
16
+ WithInitialValueOperator,
21
17
  } from '../types/index.mjs';
22
18
  import {
23
19
  binarySearch,
@@ -1,5 +1,5 @@
1
1
  import { Optional } from 'ts-data-forge';
2
- import { type ReadonlyRecord } from 'ts-type-forge';
2
+ import type { ReadonlyRecord } from 'ts-type-forge';
3
3
  import { isRootObservable, type RootObservable } from '../types/index.mjs';
4
4
  import {
5
5
  assembleObservable,
@@ -1,11 +1,11 @@
1
1
  import { expectType, Optional } from 'ts-data-forge';
2
- import {
3
- type AsyncChildObservable,
4
- type ChildObservable,
5
- type Observable,
6
- type ObservableBase,
7
- type RootObservable,
8
- type SyncChildObservable,
2
+ import type {
3
+ AsyncChildObservable,
4
+ ChildObservable,
5
+ Observable,
6
+ ObservableBase,
7
+ RootObservable,
8
+ SyncChildObservable,
9
9
  } from '../types/index.mjs';
10
10
  import {
11
11
  createAsyncChildObservable,
@@ -1,17 +1,17 @@
1
1
  import { Arr, expectType, Optional } from 'ts-data-forge';
2
- import { type NonEmptyTuple, type Tuple } from 'ts-type-forge';
2
+ import type { NonEmptyTuple, Tuple } from 'ts-type-forge';
3
3
  import { createSyncChildObservable } from '../base/index.mjs';
4
4
  import { source } from '../create/index.mjs';
5
5
  import { withInitialValue } from '../operators/index.mjs';
6
- import {
7
- type CombineObservable,
8
- type CombineObservableRefined,
9
- type InitializedObservable,
10
- type InitializedSyncChildObservable,
11
- type NonEmptyUnknownList,
12
- type Observable,
13
- type SyncChildObservable,
14
- type Wrap,
6
+ import type {
7
+ CombineObservable,
8
+ CombineObservableRefined,
9
+ InitializedObservable,
10
+ InitializedSyncChildObservable,
11
+ NonEmptyUnknownList,
12
+ Observable,
13
+ SyncChildObservable,
14
+ Wrap,
15
15
  } from '../types/index.mjs';
16
16
 
17
17
  /**
@@ -1,14 +1,14 @@
1
1
  import { Optional, expectType } from 'ts-data-forge';
2
- import { type ArrayElement, type NonEmptyTuple } from 'ts-type-forge';
2
+ import type { ArrayElement, NonEmptyTuple } from 'ts-type-forge';
3
3
  import { createSyncChildObservable } from '../base/index.mjs';
4
4
  import { source } from '../create/index.mjs';
5
- import {
6
- type MergeObservable,
7
- type MergeObservableRefined,
8
- type NonEmptyUnknownList,
9
- type Observable,
10
- type SyncChildObservable,
11
- type Wrap,
5
+ import type {
6
+ MergeObservable,
7
+ MergeObservableRefined,
8
+ NonEmptyUnknownList,
9
+ Observable,
10
+ SyncChildObservable,
11
+ Wrap,
12
12
  } from '../types/index.mjs';
13
13
 
14
14
  /**
@@ -1,18 +1,18 @@
1
1
  import { Arr, Optional, createQueue, expectType } from 'ts-data-forge';
2
- import { type NonEmptyTuple, type Tuple } from 'ts-type-forge';
2
+ import type { NonEmptyTuple, Tuple } from 'ts-type-forge';
3
3
  import { createSyncChildObservable } from '../base/index.mjs';
4
4
  import { source } from '../create/index.mjs';
5
5
  import { withInitialValue } from '../operators/index.mjs';
6
- import {
7
- type InitializedObservable,
8
- type InitializedSyncChildObservable,
9
- type NonEmptyUnknownList,
10
- type Observable,
11
- type SyncChildObservable,
12
- type TupleToQueueTuple,
13
- type Wrap,
14
- type ZipObservable,
15
- type ZipObservableRefined,
6
+ import type {
7
+ InitializedObservable,
8
+ InitializedSyncChildObservable,
9
+ NonEmptyUnknownList,
10
+ Observable,
11
+ SyncChildObservable,
12
+ TupleToQueueTuple,
13
+ Wrap,
14
+ ZipObservable,
15
+ ZipObservableRefined,
16
16
  } from '../types/index.mjs';
17
17
 
18
18
  /**
@@ -1,6 +1,6 @@
1
1
  import { asSafeUint, Optional, SafeUint } from 'ts-data-forge';
2
2
  import { createRootObservable } from '../base/index.mjs';
3
- import { type CounterObservable, type TimerId } from '../types/index.mjs';
3
+ import type { CounterObservable, TimerId } from '../types/index.mjs';
4
4
 
5
5
  /**
6
6
  * Creates an observable that emits incremental numbers at a specified interval.
@@ -1,6 +1,6 @@
1
1
  import { Optional, Result } from 'ts-data-forge';
2
2
  import { createRootObservable } from '../base/index.mjs';
3
- import { type FromPromiseObservable } from '../types/index.mjs';
3
+ import type { FromPromiseObservable } from '../types/index.mjs';
4
4
 
5
5
  /**
6
6
  * Creates an observable from a Promise factory that receives an `AbortSignal`.
@@ -1,6 +1,6 @@
1
1
  import { Optional, Result } from 'ts-data-forge';
2
2
  import { createRootObservable } from '../base/index.mjs';
3
- import { type FromPromiseObservable } from '../types/index.mjs';
3
+ import type { FromPromiseObservable } from '../types/index.mjs';
4
4
 
5
5
  /**
6
6
  * Creates an observable from a Promise.
@@ -1,8 +1,8 @@
1
1
  import { Optional, Result } from 'ts-data-forge';
2
2
  import { createRootObservable } from '../base/index.mjs';
3
- import {
4
- type FromSubscribableObservable,
5
- type Subscribable,
3
+ import type {
4
+ FromSubscribableObservable,
5
+ Subscribable,
6
6
  } from '../types/index.mjs';
7
7
 
8
8
  /**
@@ -1,6 +1,6 @@
1
1
  import { Optional } from 'ts-data-forge';
2
2
  import { createRootObservable } from '../base/index.mjs';
3
- import { type InitializedRootObservable } from '../types/index.mjs';
3
+ import type { InitializedRootObservable } from '../types/index.mjs';
4
4
 
5
5
  /**
6
6
  * Creates an Observable that holds a single static value and immediately
@@ -1,8 +1,8 @@
1
1
  import { Arr, Optional } from 'ts-data-forge';
2
2
  import { createRootObservable } from '../base/index.mjs';
3
- import {
4
- type InitializedSourceObservable,
5
- type SourceObservable,
3
+ import type {
4
+ InitializedSourceObservable,
5
+ SourceObservable,
6
6
  } from '../types/index.mjs';
7
7
 
8
8
  /**
@@ -1,6 +1,6 @@
1
1
  import { Optional } from 'ts-data-forge';
2
2
  import { createRootObservable } from '../base/index.mjs';
3
- import { type TimerId, type TimerObservable } from '../types/index.mjs';
3
+ import type { TimerId, TimerObservable } from '../types/index.mjs';
4
4
 
5
5
  /**
6
6
  * Creates an observable that emits 0 after a specified delay and then completes.
@@ -1,10 +1,10 @@
1
1
  import { Optional } from 'ts-data-forge';
2
2
  import { createAsyncChildObservable } from '../base/index.mjs';
3
- import {
4
- type AuditOperatorObservable,
5
- type KeepInitialValueOperator,
6
- type Observable,
7
- type TimerId,
3
+ import type {
4
+ AuditOperatorObservable,
5
+ KeepInitialValueOperator,
6
+ Observable,
7
+ TimerId,
8
8
  } from '../types/index.mjs';
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
1
  import { Optional } from 'ts-data-forge';
2
2
  import { createAsyncChildObservable } from '../base/index.mjs';
3
- import {
4
- type DebounceOperatorObservable,
5
- type KeepInitialValueOperator,
6
- type Observable,
7
- type TimerId,
3
+ import type {
4
+ DebounceOperatorObservable,
5
+ KeepInitialValueOperator,
6
+ Observable,
7
+ TimerId,
8
8
  } from '../types/index.mjs';
9
9
 
10
10
  /**
@@ -7,11 +7,11 @@ import {
7
7
  } from 'ts-data-forge';
8
8
  import { createSyncChildObservable } from '../base/index.mjs';
9
9
  import { source } from '../create/index.mjs';
10
- import {
11
- type DropInitialValueOperator,
12
- type FilterOperatorObservable,
13
- type InitializedObservable,
14
- type Observable,
10
+ import type {
11
+ DropInitialValueOperator,
12
+ FilterOperatorObservable,
13
+ InitializedObservable,
14
+ Observable,
15
15
  } from '../types/index.mjs';
16
16
  import { withInitialValue } from './with-initial-value.mjs';
17
17
 
@@ -1,11 +1,11 @@
1
1
  import { Optional, SafeUint, asSafeUint, expectType } from 'ts-data-forge';
2
2
  import { createSyncChildObservable } from '../base/index.mjs';
3
3
  import { source } from '../create/index.mjs';
4
- import {
5
- type InitializedObservable,
6
- type KeepInitialValueOperator,
7
- type MapOperatorObservable,
8
- type Observable,
4
+ import type {
5
+ InitializedObservable,
6
+ KeepInitialValueOperator,
7
+ MapOperatorObservable,
8
+ Observable,
9
9
  } from '../types/index.mjs';
10
10
  import { withInitialValue } from './with-initial-value.mjs';
11
11
 
@@ -1,10 +1,10 @@
1
1
  import { Arr, Optional } from 'ts-data-forge';
2
2
  import { createAsyncChildObservable } from '../base/index.mjs';
3
- import {
4
- type DropInitialValueOperator,
5
- type MergeMapOperatorObservable,
6
- type Observable,
7
- type Subscription,
3
+ import type {
4
+ DropInitialValueOperator,
5
+ MergeMapOperatorObservable,
6
+ Observable,
7
+ Subscription,
8
8
  } from '../types/index.mjs';
9
9
 
10
10
  /**
@@ -1,10 +1,10 @@
1
1
  import { Optional } from 'ts-data-forge';
2
- import { type FixedLengthTuple } from 'ts-type-forge';
2
+ import type { FixedLengthTuple } from 'ts-type-forge';
3
3
  import { createSyncChildObservable } from '../base/index.mjs';
4
- import {
5
- type DropInitialValueOperator,
6
- type Observable,
7
- type PairwiseOperatorObservable,
4
+ import type {
5
+ DropInitialValueOperator,
6
+ Observable,
7
+ PairwiseOperatorObservable,
8
8
  } from '../types/index.mjs';
9
9
 
10
10
  /**
@@ -1,9 +1,9 @@
1
1
  import { Optional } from 'ts-data-forge';
2
2
  import { createInitializedSyncChildObservable } from '../base/index.mjs';
3
- import {
4
- type Observable,
5
- type ScanOperatorObservable,
6
- type WithInitialValueOperator,
3
+ import type {
4
+ Observable,
5
+ ScanOperatorObservable,
6
+ WithInitialValueOperator,
7
7
  } from '../types/index.mjs';
8
8
 
9
9
  /**
@@ -1,9 +1,9 @@
1
1
  import { Optional } from 'ts-data-forge';
2
2
  import { createSyncChildObservable } from '../base/index.mjs';
3
- import {
4
- type KeepInitialValueOperator,
5
- type Observable,
6
- type SkipIfNoChangeOperatorObservable,
3
+ import type {
4
+ KeepInitialValueOperator,
5
+ Observable,
6
+ SkipIfNoChangeOperatorObservable,
7
7
  } from '../types/index.mjs';
8
8
 
9
9
  /**
@@ -1,9 +1,9 @@
1
1
  import { Optional } from 'ts-data-forge';
2
2
  import { createSyncChildObservable } from '../base/index.mjs';
3
- import {
4
- type DropInitialValueOperator,
5
- type Observable,
6
- type SkipUntilOperatorObservable,
3
+ import type {
4
+ DropInitialValueOperator,
5
+ Observable,
6
+ SkipUntilOperatorObservable,
7
7
  } from '../types/index.mjs';
8
8
 
9
9
  /**
@@ -1,9 +1,9 @@
1
1
  import { Optional, SafeUint, asSafeUint, pipe } from 'ts-data-forge';
2
2
  import { createSyncChildObservable } from '../base/index.mjs';
3
- import {
4
- type DropInitialValueOperator,
5
- type Observable,
6
- type SkipWhileOperatorObservable,
3
+ import type {
4
+ DropInitialValueOperator,
5
+ Observable,
6
+ SkipWhileOperatorObservable,
7
7
  } from '../types/index.mjs';
8
8
 
9
9
  /**
@@ -1,10 +1,10 @@
1
1
  import { Optional } from 'ts-data-forge';
2
2
  import { createAsyncChildObservable } from '../base/index.mjs';
3
- import {
4
- type DropInitialValueOperator,
5
- type Observable,
6
- type Subscription,
7
- type SwitchMapOperatorObservable,
3
+ import type {
4
+ DropInitialValueOperator,
5
+ Observable,
6
+ Subscription,
7
+ SwitchMapOperatorObservable,
8
8
  } from '../types/index.mjs';
9
9
 
10
10
  /**
@@ -1,9 +1,9 @@
1
1
  import { Optional } from 'ts-data-forge';
2
2
  import { createSyncChildObservable } from '../base/index.mjs';
3
- import {
4
- type KeepInitialValueOperator,
5
- type Observable,
6
- type TakeUntilOperatorObservable,
3
+ import type {
4
+ KeepInitialValueOperator,
5
+ Observable,
6
+ TakeUntilOperatorObservable,
7
7
  } from '../types/index.mjs';
8
8
 
9
9
  /**
@@ -7,11 +7,11 @@ import {
7
7
  } from 'ts-data-forge';
8
8
  import { createSyncChildObservable } from '../base/index.mjs';
9
9
  import { source } from '../create/index.mjs';
10
- import {
11
- type DropInitialValueOperator,
12
- type InitializedObservable,
13
- type Observable,
14
- type TakeWhileOperatorObservable,
10
+ import type {
11
+ DropInitialValueOperator,
12
+ InitializedObservable,
13
+ Observable,
14
+ TakeWhileOperatorObservable,
15
15
  } from '../types/index.mjs';
16
16
  import { withInitialValue } from './with-initial-value.mjs';
17
17
 
@@ -1,10 +1,10 @@
1
1
  import { Optional } from 'ts-data-forge';
2
2
  import { createSyncChildObservable } from '../base/index.mjs';
3
- import {
4
- type KeepInitialValueOperator,
5
- type Observable,
6
- type ThrottleOperatorObservable,
7
- type TimerId,
3
+ import type {
4
+ KeepInitialValueOperator,
5
+ Observable,
6
+ ThrottleOperatorObservable,
7
+ TimerId,
8
8
  } from '../types/index.mjs';
9
9
 
10
10
  /**
@@ -1,9 +1,9 @@
1
1
  import { Arr, Optional, pipe } from 'ts-data-forge';
2
2
  import { createSyncChildObservable } from '../base/index.mjs';
3
- import {
4
- type KeepInitialValueOperator,
5
- type Observable,
6
- type WithBufferedFromOperatorObservable,
3
+ import type {
4
+ KeepInitialValueOperator,
5
+ Observable,
6
+ WithBufferedFromOperatorObservable,
7
7
  } from '../types/index.mjs';
8
8
  import { maxDepth } from '../utils/index.mjs';
9
9
 
@@ -1,9 +1,9 @@
1
1
  import { Optional, pipe } from 'ts-data-forge';
2
2
  import { createSyncChildObservable } from '../base/index.mjs';
3
- import {
4
- type DropInitialValueOperator,
5
- type Observable,
6
- type WithCurrentValueFromOperatorObservable,
3
+ import type {
4
+ DropInitialValueOperator,
5
+ Observable,
6
+ WithCurrentValueFromOperatorObservable,
7
7
  } from '../types/index.mjs';
8
8
  import { maxDepth } from '../utils/index.mjs';
9
9
 
@@ -1,11 +1,11 @@
1
1
  import { expectType, Optional } from 'ts-data-forge';
2
2
  import { createInitializedSyncChildObservable } from '../base/index.mjs';
3
3
  import { source } from '../create/index.mjs';
4
- import {
5
- type InitializedObservable,
6
- type Observable,
7
- type WithInitialValueOperator,
8
- type WithInitialValueOperatorObservable,
4
+ import type {
5
+ InitializedObservable,
6
+ Observable,
7
+ WithInitialValueOperator,
8
+ WithInitialValueOperatorObservable,
9
9
  } from '../types/index.mjs';
10
10
 
11
11
  /**
@@ -1,6 +1,6 @@
1
- import { type SafeUint } from 'ts-type-forge';
1
+ import type { SafeUint } from 'ts-type-forge';
2
2
  import { map } from '../../operators/index.mjs';
3
- import { type KeepInitialValueOperator } from '../../types/index.mjs';
3
+ import type { KeepInitialValueOperator } from '../../types/index.mjs';
4
4
 
5
5
  /**
6
6
  * Attaches a sequential index to each emitted value, producing `[index, value]` tuples.
@@ -1,6 +1,6 @@
1
1
  import { Optional, type UnknownOptional } from 'ts-data-forge';
2
2
  import { map } from '../../operators/index.mjs';
3
- import { type KeepInitialValueOperator } from '../../types/index.mjs';
3
+ import type { KeepInitialValueOperator } from '../../types/index.mjs';
4
4
 
5
5
  /**
6
6
  * Transforms the inner value of an `Optional` type emitted by the source.
@@ -1,6 +1,6 @@
1
1
  import { Result, type UnknownResult } from 'ts-data-forge';
2
2
  import { map } from '../../operators/index.mjs';
3
- import { type KeepInitialValueOperator } from '../../types/index.mjs';
3
+ import type { KeepInitialValueOperator } from '../../types/index.mjs';
4
4
 
5
5
  /**
6
6
  * Transforms the error value (`Err`) of a `Result` type emitted by the source.
@@ -1,6 +1,6 @@
1
1
  import { Result, type UnknownResult } from 'ts-data-forge';
2
2
  import { map } from '../../operators/index.mjs';
3
- import { type KeepInitialValueOperator } from '../../types/index.mjs';
3
+ import type { KeepInitialValueOperator } from '../../types/index.mjs';
4
4
 
5
5
  /**
6
6
  * Transforms the success value (`Ok`) of a `Result` type emitted by the source.
@@ -1,5 +1,5 @@
1
1
  import { map } from '../../operators/index.mjs';
2
- import { type KeepInitialValueOperator } from '../../types/index.mjs';
2
+ import type { KeepInitialValueOperator } from '../../types/index.mjs';
3
3
 
4
4
  /**
5
5
  * Maps all emitted values to a constant value, ignoring the source values.
@@ -1,5 +1,5 @@
1
1
  import { map } from '../../operators/index.mjs';
2
- import { type KeepInitialValueOperator } from '../../types/index.mjs';
2
+ import type { KeepInitialValueOperator } from '../../types/index.mjs';
3
3
 
4
4
  /**
5
5
  * Extracts a property value from each emitted object by key.
@@ -1,7 +1,7 @@
1
1
  import { PositiveSafeInt } from 'ts-data-forge';
2
- import { type PositiveSafeIntWithSmallInt } from 'ts-type-forge';
2
+ import type { PositiveSafeIntWithSmallInt } from 'ts-type-forge';
3
3
  import { skipWhile } from '../../operators/index.mjs';
4
- import { type DropInitialValueOperator } from '../../types/index.mjs';
4
+ import type { DropInitialValueOperator } from '../../types/index.mjs';
5
5
 
6
6
  /**
7
7
  * Skips the first `n` emissions from the source observable.
@@ -1,6 +1,6 @@
1
- import { type PositiveSafeIntWithSmallInt } from 'ts-type-forge';
1
+ import type { PositiveSafeIntWithSmallInt } from 'ts-type-forge';
2
2
  import { takeWhile } from '../../operators/index.mjs';
3
- import { type DropInitialValueOperator } from '../../types/index.mjs';
3
+ import type { DropInitialValueOperator } from '../../types/index.mjs';
4
4
 
5
5
  /**
6
6
  * Takes only the first `n` emissions from the source observable, then completes.
@@ -1,7 +1,7 @@
1
1
  import { Optional, type UnknownOptional } from 'ts-data-forge';
2
- import { type Fn } from 'ts-type-forge';
2
+ import type { Fn } from 'ts-type-forge';
3
3
  import { map } from '../../operators/index.mjs';
4
- import { type KeepInitialValueOperator } from '../../types/index.mjs';
4
+ import type { KeepInitialValueOperator } from '../../types/index.mjs';
5
5
 
6
6
  /**
7
7
  * Unwraps `Optional` values, converting `Some(value)` to `value` and `None` to `undefined`.
@@ -1,7 +1,7 @@
1
1
  import { Result, type UnknownResult } from 'ts-data-forge';
2
- import { type Fn } from 'ts-type-forge';
2
+ import type { Fn } from 'ts-type-forge';
3
3
  import { map } from '../../operators/index.mjs';
4
- import { type KeepInitialValueOperator } from '../../types/index.mjs';
4
+ import type { KeepInitialValueOperator } from '../../types/index.mjs';
5
5
 
6
6
  /**
7
7
  * Unwraps the error value from a `Result`, converting `Err(error)` to `error` and `Ok` to `undefined`.
@@ -1,7 +1,7 @@
1
1
  import { Result, type UnknownResult } from 'ts-data-forge';
2
- import { type Fn } from 'ts-type-forge';
2
+ import type { Fn } from 'ts-type-forge';
3
3
  import { map } from '../../operators/index.mjs';
4
- import { type KeepInitialValueOperator } from '../../types/index.mjs';
4
+ import type { KeepInitialValueOperator } from '../../types/index.mjs';
5
5
 
6
6
  /**
7
7
  * Unwraps the success value from a `Result`, converting `Ok(value)` to `value` and `Err` to `undefined`.
@@ -1,4 +1,4 @@
1
- import { type Brand } from 'ts-type-forge';
1
+ import type { Brand } from 'ts-type-forge';
2
2
 
3
3
  export type ObservableId = Brand<symbol, 'observable-id'>;
4
4