beestate 0.1.4 → 0.1.5
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/README.md +1 -0
- package/dist/@types/InternalStore.d.ts +21 -30
- package/dist/@types/StoreProvider.d.ts +2 -2
- package/dist/@types/createStore.d.ts +5 -6
- package/dist/@types/createStoreRegistry.d.ts +8 -5
- package/dist/@types/createUseDispatcher.d.ts +6 -6
- package/dist/@types/createUseLatest.d.ts +11 -0
- package/dist/@types/createUseProp.d.ts +3 -6
- package/dist/@types/createUsePropAll.d.ts +3 -6
- package/dist/@types/createUseStore.d.ts +11 -11
- package/dist/@types/index.d.ts +11 -3
- package/dist/@types/pipe/Error.d.ts +6 -0
- package/dist/@types/pipe/check.d.ts +37 -0
- package/dist/@types/pipe/createPipeKit.d.ts +24 -0
- package/dist/@types/pipe/debug/createDebugger.d.ts +2 -0
- package/dist/@types/pipe/debug/debugInstruction.d.ts +1 -0
- package/dist/@types/pipe/debug/extendedDebugInstruction.d.ts +5 -0
- package/dist/@types/pipe/debug/index.d.ts +4 -0
- package/dist/@types/pipe/debug/log.d.ts +2 -0
- package/dist/@types/pipe/deepCopy.env-detect.dev.d.ts +1 -0
- package/dist/@types/pipe/deepCopy.env-detect.main.d.ts +4 -0
- package/dist/@types/pipe/entities/Adjunct.d.ts +3 -0
- package/dist/@types/pipe/entities/Connect.d.ts +9 -0
- package/dist/@types/pipe/entities/DataBarrel.d.ts +24 -0
- package/dist/@types/pipe/entities/Fill.d.ts +25 -0
- package/dist/@types/pipe/entities/Instruction.d.ts +81 -0
- package/dist/@types/pipe/entities/ParentPipe.d.ts +9 -0
- package/dist/@types/pipe/entities/Pipe.d.ts +57 -0
- package/dist/@types/pipe/entities/Stream.d.ts +13 -0
- package/dist/@types/pipe/entities/StreamGroup.d.ts +25 -0
- package/dist/@types/pipe/entities/index.d.ts +9 -0
- package/dist/@types/pipe/index.core.d.ts +26 -0
- package/dist/@types/pipe/index.d.ts +4 -0
- package/dist/@types/pipe/index.debug.d.ts +14 -0
- package/dist/@types/pipe/instruction.d.ts +9 -0
- package/dist/@types/requestState.d.ts +19 -0
- package/dist/@types/requestStateDefault.d.ts +7 -0
- package/dist/@types/requestStatus.d.ts +12 -0
- package/dist/@types/types/Dispatcher.d.ts +5 -7
- package/dist/@types/types/InitInstance.d.ts +2 -2
- package/dist/@types/types/InitPayload.d.ts +3 -4
- package/dist/@types/types/InternalStoreProps.d.ts +6 -6
- package/dist/@types/types/Reducer.d.ts +2 -2
- package/dist/@types/types/ReducerLink.d.ts +8 -6
- package/dist/@types/types/ReducerMap.d.ts +2 -2
- package/dist/@types/types/ReducerPayload.d.ts +3 -4
- package/dist/@types/types/RegisterDefaultInstance.d.ts +2 -2
- package/dist/@types/types/RegisterInstance.d.ts +3 -3
- package/dist/@types/types/RequestState/RequestAbortedState.d.ts +12 -0
- package/dist/@types/types/RequestState/RequestFulfilledState.d.ts +12 -0
- package/dist/@types/types/RequestState/RequestIdleState.d.ts +12 -0
- package/dist/@types/types/RequestState/RequestPendingState.d.ts +12 -0
- package/dist/@types/types/RequestState/RequestRejectedState.d.ts +12 -0
- package/dist/@types/types/RequestState.d.ts +7 -0
- package/dist/@types/types/RequestStateMeta.d.ts +1 -0
- package/dist/@types/types/RequestStateStoreKey.d.ts +5 -0
- package/dist/@types/types/ResetInstance.d.ts +1 -1
- package/dist/@types/types/ResetPayload.d.ts +3 -4
- package/dist/@types/types/StateLink.d.ts +5 -5
- package/dist/@types/types/Store.d.ts +8 -8
- package/dist/@types/types/StoreController.d.ts +5 -5
- package/dist/@types/types/StoreControllerInstance.d.ts +3 -3
- package/dist/@types/types/StoreRegistry.d.ts +1 -1
- package/dist/@types/types/UseProp.d.ts +7 -0
- package/dist/@types/types/UsePropAll.d.ts +7 -0
- package/dist/@types/types/index.d.ts +10 -0
- package/dist/cjs/index.cjs.js +139 -45
- package/dist/esm/index.esm.js +139 -47
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,37 +1,31 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
1
|
+
import type { InitPayload } from './types/index.tsx';
|
|
2
|
+
import type { InstanceKey } from './types/index.tsx';
|
|
3
|
+
import type { Payload } from './types/index.tsx';
|
|
4
|
+
import type { Reducer } from './types/index.tsx';
|
|
5
|
+
import type { ReducerMap } from './types/index.tsx';
|
|
6
|
+
import type { ResetPayload } from './types/index.tsx';
|
|
7
|
+
import type { StoreState } from './types/index.tsx';
|
|
5
8
|
export type Dispatch<TStoreState extends StoreState = StoreState> = {
|
|
6
|
-
<TPayload extends Payload = Payload>(instanceKey: InstanceKey, payload: TPayload, reducer: Reducer<TStoreState, TPayload>): void;
|
|
9
|
+
<TPayload extends void | Payload = void | Payload>(instanceKey: InstanceKey, payload: TPayload, reducer: Reducer<TStoreState, TPayload>): void;
|
|
7
10
|
};
|
|
8
|
-
export type
|
|
9
|
-
(instanceKey: InstanceKey):
|
|
10
|
-
};
|
|
11
|
-
export type GetSnapshotAll<TStoreState extends StoreState = StoreState> = {
|
|
12
|
-
(): Record<symbol | string, TStoreState>;
|
|
13
|
-
};
|
|
14
|
-
export type Listener = {
|
|
15
|
-
(): void;
|
|
11
|
+
export type Listener<TStoreState extends StoreState = StoreState> = {
|
|
12
|
+
<TPayload extends void | Payload = void | Payload, TReducer extends Reducer<TStoreState, TPayload> = Reducer<TStoreState, TPayload>>(instanceKey: InstanceKey, payload: TPayload, reducer: TReducer): void;
|
|
16
13
|
};
|
|
17
|
-
export type ListenerAll = {
|
|
18
|
-
(): void;
|
|
14
|
+
export type ListenerAll<TStoreState extends StoreState = StoreState> = {
|
|
15
|
+
<TPayload extends void | Payload = void | Payload, TReducer extends Reducer<TStoreState, TPayload> = Reducer<TStoreState, TPayload>>(instanceKey: InstanceKey, payload: TPayload, reducer: TReducer): void;
|
|
19
16
|
};
|
|
20
|
-
export type Subscribe = {
|
|
21
|
-
(instanceKey: InstanceKey, listener: Listener): Unsubscribe;
|
|
17
|
+
export type Subscribe<TStoreState extends StoreState = StoreState> = {
|
|
18
|
+
(instanceKey: InstanceKey, listener: Listener<TStoreState>): Unsubscribe;
|
|
22
19
|
};
|
|
23
20
|
export type Unsubscribe = {
|
|
24
21
|
(): void;
|
|
25
22
|
};
|
|
26
|
-
export type SubscribeAll = {
|
|
27
|
-
(listener: ListenerAll): UnsubscribeAll;
|
|
23
|
+
export type SubscribeAll<TStoreState extends StoreState = StoreState> = {
|
|
24
|
+
(listener: ListenerAll<TStoreState>): UnsubscribeAll;
|
|
28
25
|
};
|
|
29
26
|
export type UnsubscribeAll = {
|
|
30
27
|
(): void;
|
|
31
28
|
};
|
|
32
|
-
export type Update<TStoreState extends StoreState = StoreState> = {
|
|
33
|
-
(instanceKey: InstanceKey, newState: TStoreState): void;
|
|
34
|
-
};
|
|
35
29
|
export type InitInstance<TStoreState extends StoreState = StoreState, TInitPayload extends void | Payload = void | Payload, TResetPayload extends void | Payload = void | Payload> = {
|
|
36
30
|
(instanceKey: InstanceKey, initialState: TStoreState, initPayload: TInitPayload, initReducer: Reducer<TStoreState, TInitPayload>): ResetInstance<TStoreState, TResetPayload>;
|
|
37
31
|
};
|
|
@@ -44,19 +38,16 @@ export type GetState<TStoreState extends StoreState = StoreState> = {
|
|
|
44
38
|
export type GetStateAll<TStoreState extends StoreState = StoreState> = {
|
|
45
39
|
(): Record<InstanceKey, TStoreState>;
|
|
46
40
|
};
|
|
47
|
-
export declare class InternalStore<TStoreState extends StoreState = StoreState,
|
|
41
|
+
export declare class InternalStore<TStoreState extends StoreState = StoreState, TReducerMap extends ReducerMap<TStoreState> = ReducerMap<TStoreState>> {
|
|
48
42
|
private listeners;
|
|
49
43
|
private listenersAll;
|
|
50
44
|
name: string;
|
|
51
45
|
private state;
|
|
52
46
|
constructor(name: string);
|
|
53
|
-
getStateAll: GetStateAll<TStoreState>;
|
|
54
47
|
getState: GetState<TStoreState>;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
getSnapshotAll: GetSnapshotAll<TStoreState>;
|
|
48
|
+
getStateAll: GetStateAll<TStoreState>;
|
|
49
|
+
initInstance: InitInstance<TStoreState, InitPayload<TReducerMap>, ResetPayload<TReducerMap>>;
|
|
50
|
+
subscribe: Subscribe<TStoreState>;
|
|
51
|
+
subscribeAll: SubscribeAll<TStoreState>;
|
|
60
52
|
dispatch: Dispatch<TStoreState>;
|
|
61
|
-
update: Update<TStoreState>;
|
|
62
53
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import type { InstanceKey } from './types/index.tsx';
|
|
3
|
+
import type { Store } from './types/index.tsx';
|
|
4
4
|
export type StoreProviderProps = React.PropsWithChildren<{
|
|
5
5
|
store: Store;
|
|
6
6
|
instanceKey: InstanceKey;
|
|
@@ -1,10 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { type StoreState } from './types/index.tsx';
|
|
1
|
+
import type { Payload } from './types/index.tsx';
|
|
2
|
+
import type { ReducerMap } from './types/index.tsx';
|
|
3
|
+
import type { Store } from './types/index.tsx';
|
|
4
|
+
import type { StoreState } from './types/index.tsx';
|
|
6
5
|
type CheckReducerMap<TStoreState extends StoreState = StoreState, TReducerMap extends ReducerMap<TStoreState> = ReducerMap<TStoreState>> = {
|
|
7
|
-
[TKey in keyof TReducerMap]: TKey extends keyof TStoreState ? void : TReducerMap[TKey] extends (state: any, payload: void) => any ? TReducerMap[TKey] : TReducerMap[TKey] extends (state: any, payload: infer TPayload) => any ? TPayload extends Payload ? TReducerMap[TKey] :
|
|
6
|
+
[TKey in keyof TReducerMap]: TKey extends keyof TStoreState ? void : TReducerMap[TKey] extends (state: any, payload: void) => any ? TReducerMap[TKey] : TReducerMap[TKey] extends (state: any, payload: infer TPayload) => any ? TPayload extends Payload ? TReducerMap[TKey] : void : void;
|
|
8
7
|
};
|
|
9
8
|
export declare function createStore<TStoreName extends string = string, TStoreState extends StoreState = StoreState, TReducerMap extends ReducerMap<TStoreState> = ReducerMap<TStoreState>>(name: TStoreName, initialState: TStoreState, reducers: CheckReducerMap<TStoreState, TReducerMap>): Store<TStoreName, TStoreState, TReducerMap>;
|
|
10
9
|
export {};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
|
+
import type { StoreRegistry } from './types/index.tsx';
|
|
1
2
|
export declare function createStoreRegistry(): {
|
|
2
|
-
|
|
3
|
-
useProp: <TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TStateName extends keyof TStoreState = keyof TStoreState>(stateLink: import("./types/StateLink.tsx").StateLink<string, TStoreState, TReducerMap[`$$init`], TReducerMap[`$$reset`], TStateName>, instanceKey?: import("./index.tsx").InstanceKey) => TStoreState[TStateName];
|
|
4
|
-
usePropAll: <TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TStateName extends keyof TStoreState = keyof TStoreState>(stateLink: import("./types/StateLink.tsx").StateLink<string, TStoreState, TReducerMap[`$$init`], TReducerMap[`$$reset`], TStateName>, instanceKeys?: import("./index.tsx").InstanceKey[] | ((state: TStoreState) => boolean)) => [instanceKey: import("./index.tsx").InstanceKey, state: TStoreState[TStateName]][];
|
|
3
|
+
storeRegistry: StoreRegistry;
|
|
5
4
|
useStore: {
|
|
6
|
-
<TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TInitPayload extends import("./types/InitPayload.tsx").InitPayload<
|
|
7
|
-
<TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TInitPayload extends import("./types/InitPayload.tsx").InitPayload<
|
|
5
|
+
<TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TInitPayload extends import("./types/InitPayload.tsx").InitPayload<TReducerMap> = import("./types/InitPayload.tsx").InitPayload<TReducerMap>, TResetPayload extends import("./types/ResetPayload.tsx").ResetPayload<TReducerMap> = import("./types/ResetPayload.tsx").ResetPayload<TReducerMap>>(store: import("./types/Store.tsx").Store<string, TStoreState, TReducerMap>, registerInstance: import("./types/RegisterDefaultInstance.tsx").RegisterDefaultInstance<TInitPayload, TResetPayload>): void;
|
|
6
|
+
<TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TInitPayload extends import("./types/InitPayload.tsx").InitPayload<TReducerMap> = import("./types/InitPayload.tsx").InitPayload<TReducerMap>, TResetPayload extends import("./types/ResetPayload.tsx").ResetPayload<TReducerMap> = import("./types/ResetPayload.tsx").ResetPayload<TReducerMap>>(store: import("./types/Store.tsx").Store<string, TStoreState, TReducerMap>, instanceKeys: import("./index.tsx").InstanceKey[], registerInstance: import("./types/RegisterInstance.tsx").RegisterInstance<TInitPayload, TResetPayload>): void;
|
|
8
7
|
};
|
|
8
|
+
useProp: import("./types/UseProp.tsx").UseProp;
|
|
9
|
+
usePropAll: import("./types/UsePropAll.tsx").UsePropAll;
|
|
10
|
+
useDispatcher: <TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TReducerName extends string = string, TPayload extends import("./types/ReducerPayload.tsx").ReducerPayload<TReducerMap[TReducerName]> = import("./types/ReducerPayload.tsx").ReducerPayload<TReducerMap[TReducerName]>>(reducerLink: import("./types/ReducerLink.tsx").ReducerLink<string, TStoreState, TReducerMap, TReducerName>) => import("./types/Dispatcher.tsx").Dispatcher<TPayload>;
|
|
11
|
+
useLatest: <TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TReducerName extends string = string, TReducer extends import("./types/Reducer.tsx").Reducer<TStoreState, any> = import("./types/Reducer.tsx").Reducer<TStoreState, any>>(saga: (actionName: TReducerName, payload: any, ctx: any) => void, reducerLinks: import("./types/ReducerLink.tsx").ReducerLink<string, TStoreState, TReducerMap, TReducerName>[], instanceKey?: import("./index.tsx").InstanceKey) => any;
|
|
9
12
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReducerMap } from './types/index.tsx';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
export declare function createUseDispatcher(storeRegistry: StoreRegistry): <TStoreState extends StoreState = StoreState, TReducerMap extends ReducerMap<TStoreState> = ReducerMap<TStoreState>, TReducerName extends string = string,
|
|
2
|
+
import type { Dispatcher } from './types/index.tsx';
|
|
3
|
+
import type { ReducerLink } from './types/index.tsx';
|
|
4
|
+
import type { ReducerPayload } from './types/index.tsx';
|
|
5
|
+
import type { StoreRegistry } from './types/index.tsx';
|
|
6
|
+
import type { StoreState } from './types/index.tsx';
|
|
7
|
+
export declare function createUseDispatcher(storeRegistry: StoreRegistry): <TStoreState extends StoreState = StoreState, TReducerMap extends ReducerMap<TStoreState> = ReducerMap<TStoreState>, TReducerName extends string = string, TPayload extends ReducerPayload<TReducerMap[TReducerName]> = ReducerPayload<TReducerMap[TReducerName]>>(reducerLink: ReducerLink<string, TStoreState, TReducerMap, TReducerName>) => Dispatcher<TPayload>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { InstanceKey } from './types/index.tsx';
|
|
2
|
+
import type { Reducer } from './types/index.tsx';
|
|
3
|
+
import type { ReducerLink } from './types/index.tsx';
|
|
4
|
+
import type { ReducerMap } from './types/index.tsx';
|
|
5
|
+
import type { StoreRegistry } from './types/index.tsx';
|
|
6
|
+
import type { StoreState } from './types/index.tsx';
|
|
7
|
+
type Saga<TActionName extends string = string, TPayload extends any = any, TContext extends any = any> = {
|
|
8
|
+
(actionName: TActionName, payload: TPayload, ctx: TContext): void;
|
|
9
|
+
};
|
|
10
|
+
export declare function createUseLatest(storeRegistry: StoreRegistry): <TStoreState extends StoreState = StoreState, TReducerMap extends ReducerMap<TStoreState> = ReducerMap<TStoreState>, TReducerName extends string = string, TReducer extends Reducer<TStoreState, any> = Reducer<TStoreState, any>>(saga: Saga<TReducerName>, reducerLinks: ReducerLink<string, TStoreState, TReducerMap, TReducerName>[], instanceKey?: InstanceKey) => any;
|
|
11
|
+
export {};
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { type StoreRegistry } from './types/index.tsx';
|
|
5
|
-
import { type StoreState } from './types/index.tsx';
|
|
6
|
-
export declare function createUseProp(storeRegistry: StoreRegistry): <TStoreState extends StoreState = StoreState, TReducerMap extends ReducerMap<TStoreState> = ReducerMap<TStoreState>, TStateName extends keyof TStoreState = keyof TStoreState>(stateLink: StateLink<string, TStoreState, TReducerMap[`$$init`], TReducerMap[`$$reset`], TStateName>, instanceKey?: InstanceKey) => TStoreState[TStateName];
|
|
1
|
+
import type { StoreRegistry } from './types/index.tsx';
|
|
2
|
+
import type { UseProp } from './types/index.tsx';
|
|
3
|
+
export declare function createUseProp(storeRegistry: StoreRegistry): UseProp;
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
import { type StoreRegistry } from './types/index.tsx';
|
|
5
|
-
import { type StoreState } from './types/index.tsx';
|
|
6
|
-
export declare function createUsePropAll(storeRegistry: StoreRegistry): <TStoreState extends StoreState = StoreState, TReducerMap extends ReducerMap<TStoreState> = ReducerMap<TStoreState>, TStateName extends keyof TStoreState = keyof TStoreState>(stateLink: StateLink<string, TStoreState, TReducerMap[`$$init`], TReducerMap[`$$reset`], TStateName>, instanceKeys?: InstanceKey[] | ((state: TStoreState) => boolean)) => [instanceKey: InstanceKey, state: TStoreState[TStateName]][];
|
|
1
|
+
import type { StoreRegistry } from './types/index.tsx';
|
|
2
|
+
import type { UsePropAll } from './types/index.tsx';
|
|
3
|
+
export declare function createUsePropAll(storeRegistry: StoreRegistry): UsePropAll;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
1
|
+
import type { InitPayload } from './types/index.tsx';
|
|
2
|
+
import type { InstanceKey } from './types/index.tsx';
|
|
3
|
+
import type { ReducerMap } from './types/index.tsx';
|
|
4
|
+
import type { RegisterDefaultInstance } from './types/index.tsx';
|
|
5
|
+
import type { RegisterInstance } from './types/index.tsx';
|
|
6
|
+
import type { ResetPayload } from './types/index.tsx';
|
|
7
|
+
import type { Store } from './types/index.tsx';
|
|
8
|
+
import type { StoreRegistry } from './types/index.tsx';
|
|
9
|
+
import type { StoreState } from './types/index.tsx';
|
|
10
10
|
export declare function createUseStore(storeRegistry: StoreRegistry): {
|
|
11
|
-
<TStoreState extends StoreState = StoreState, TReducerMap extends ReducerMap<TStoreState> = ReducerMap<TStoreState>, TInitPayload extends InitPayload<
|
|
12
|
-
<TStoreState extends StoreState = StoreState, TReducerMap extends ReducerMap<TStoreState> = ReducerMap<TStoreState>, TInitPayload extends InitPayload<
|
|
11
|
+
<TStoreState extends StoreState = StoreState, TReducerMap extends ReducerMap<TStoreState> = ReducerMap<TStoreState>, TInitPayload extends InitPayload<TReducerMap> = InitPayload<TReducerMap>, TResetPayload extends ResetPayload<TReducerMap> = ResetPayload<TReducerMap>>(store: Store<string, TStoreState, TReducerMap>, registerInstance: RegisterDefaultInstance<TInitPayload, TResetPayload>): void;
|
|
12
|
+
<TStoreState extends StoreState = StoreState, TReducerMap extends ReducerMap<TStoreState> = ReducerMap<TStoreState>, TInitPayload extends InitPayload<TReducerMap> = InitPayload<TReducerMap>, TResetPayload extends ResetPayload<TReducerMap> = ResetPayload<TReducerMap>>(store: Store<string, TStoreState, TReducerMap>, instanceKeys: InstanceKey[], registerInstance: RegisterInstance<TInitPayload, TResetPayload>): void;
|
|
13
13
|
};
|
package/dist/@types/index.d.ts
CHANGED
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
export { type InstanceKey } from './types/index.tsx';
|
|
2
|
+
export { type RequestState } from './types/index.tsx';
|
|
3
|
+
export { type RequestAbortedState } from './types/RequestState/RequestAbortedState.tsx';
|
|
4
|
+
export { type RequestFulfilledState } from './types/RequestState/RequestFulfilledState.tsx';
|
|
5
|
+
export { type RequestIdleState } from './types/RequestState/RequestIdleState.tsx';
|
|
6
|
+
export { type RequestPendingState } from './types/RequestState/RequestPendingState.tsx';
|
|
7
|
+
export { type RequestRejectedState } from './types/RequestState/RequestRejectedState.tsx';
|
|
2
8
|
export { DESTROY } from './constants.tsx';
|
|
3
9
|
export { createStore } from './createStore.tsx';
|
|
4
10
|
export { createStoreRegistry } from './createStoreRegistry.tsx';
|
|
5
11
|
export { InternalStore } from './InternalStore.tsx';
|
|
12
|
+
export { requestState } from './requestState.tsx';
|
|
13
|
+
export { requestStatus } from './requestStatus.tsx';
|
|
6
14
|
export { StoreProvider } from './StoreProvider.tsx';
|
|
7
|
-
export declare const useDispatcher: <TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TReducerName extends string = string,
|
|
8
|
-
<TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TInitPayload extends import("./types/InitPayload.tsx").InitPayload<
|
|
9
|
-
<TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TInitPayload extends import("./types/InitPayload.tsx").InitPayload<
|
|
15
|
+
export declare const useDispatcher: <TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TReducerName extends string = string, TPayload extends import("./types/ReducerPayload.tsx").ReducerPayload<TReducerMap[TReducerName]> = import("./types/ReducerPayload.tsx").ReducerPayload<TReducerMap[TReducerName]>>(reducerLink: import("./types/ReducerLink.tsx").ReducerLink<string, TStoreState, TReducerMap, TReducerName>) => import("./types/Dispatcher.tsx").Dispatcher<TPayload>, useProp: import("./types/UseProp.tsx").UseProp, usePropAll: import("./types/UsePropAll.tsx").UsePropAll, useStore: {
|
|
16
|
+
<TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TInitPayload extends import("./types/InitPayload.tsx").InitPayload<TReducerMap> = import("./types/InitPayload.tsx").InitPayload<TReducerMap>, TResetPayload extends import("./types/ResetPayload.tsx").ResetPayload<TReducerMap> = import("./types/ResetPayload.tsx").ResetPayload<TReducerMap>>(store: import("./types/Store.tsx").Store<string, TStoreState, TReducerMap>, registerInstance: import("./types/RegisterDefaultInstance.tsx").RegisterDefaultInstance<TInitPayload, TResetPayload>): void;
|
|
17
|
+
<TStoreState extends import("./types/StoreState.tsx").StoreState = import("./types/StoreState.tsx").StoreState, TReducerMap extends import("./types/ReducerMap.tsx").ReducerMap<TStoreState> = import("./types/ReducerMap.tsx").ReducerMap<TStoreState>, TInitPayload extends import("./types/InitPayload.tsx").InitPayload<TReducerMap> = import("./types/InitPayload.tsx").InitPayload<TReducerMap>, TResetPayload extends import("./types/ResetPayload.tsx").ResetPayload<TReducerMap> = import("./types/ResetPayload.tsx").ResetPayload<TReducerMap>>(store: import("./types/Store.tsx").Store<string, TStoreState, TReducerMap>, instanceKeys: import("./index.tsx").InstanceKey[], registerInstance: import("./types/RegisterInstance.tsx").RegisterInstance<TInitPayload, TResetPayload>): void;
|
|
10
18
|
};
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Adjunct } from './entities';
|
|
2
|
+
import type { BasePipe } from './entities';
|
|
3
|
+
import type { BasePipeWithCreateDebugger } from './entities';
|
|
4
|
+
import type { BasePipeWithDisplayName } from './entities';
|
|
5
|
+
import type { DataBarrel } from './entities';
|
|
6
|
+
import type { DebugInstruction } from './entities';
|
|
7
|
+
import type { Final } from './entities';
|
|
8
|
+
import type { Instruction } from './entities';
|
|
9
|
+
import type { StreamGroup } from './entities';
|
|
10
|
+
import type { ControlInstruction } from './entities';
|
|
11
|
+
export declare function getIsPipe(adjunct: Adjunct): adjunct is BasePipe;
|
|
12
|
+
export declare function getIsInstruction(adjunct: Adjunct): adjunct is Instruction;
|
|
13
|
+
export declare function getIsDisplayNameInstruction(adjunct: Adjunct): adjunct is DebugInstruction;
|
|
14
|
+
export declare function getIsDebugInstruction(adjunct: Adjunct): adjunct is DebugInstruction;
|
|
15
|
+
export declare function getIsInstructionWithDisplayName(adjunct: Adjunct): adjunct is (Instruction & {
|
|
16
|
+
displayName: string;
|
|
17
|
+
});
|
|
18
|
+
export declare function getIsPipeWithCreateDebugger(adjunct: Adjunct): adjunct is BasePipeWithCreateDebugger;
|
|
19
|
+
export declare function getIsPipeWithDisplayName(adjunct: Adjunct): adjunct is BasePipeWithDisplayName;
|
|
20
|
+
export declare function getIsControlInstruction(adjunct: Adjunct): adjunct is ControlInstruction;
|
|
21
|
+
export declare function getIsStreamEmitInstruction(adjunct: Adjunct): adjunct is Omit<ControlInstruction, `createStreamEmitHandler`> & {
|
|
22
|
+
createStreamEmitHandler: NonNullable<ControlInstruction[`createStreamEmitHandler`]>;
|
|
23
|
+
};
|
|
24
|
+
export declare function getIsStreamTerminateInstruction(adjunct: Adjunct): adjunct is Omit<ControlInstruction, `createStreamTerminateHandler`> & {
|
|
25
|
+
createStreamTerminateHandler: NonNullable<ControlInstruction[`createStreamTerminateHandler`]>;
|
|
26
|
+
};
|
|
27
|
+
export declare function getIsForkInstruction(adjunct: Adjunct): adjunct is Omit<ControlInstruction, `createStreamTerminateHandler`> & {
|
|
28
|
+
createStreamTerminateHandler: NonNullable<ControlInstruction[`createStreamTerminateHandler`]>;
|
|
29
|
+
};
|
|
30
|
+
export declare function getIsStreamGroupFulfilled(streamGroup: StreamGroup): boolean;
|
|
31
|
+
export declare function getIsStreamGroupOpen(streamGroup: StreamGroup): boolean;
|
|
32
|
+
export declare function getIsStreamGroupClosed(streamGroup: StreamGroup): boolean;
|
|
33
|
+
export declare function getIsStreamGroupRetired(streamGroup: StreamGroup): boolean;
|
|
34
|
+
export declare function getIsStreamGroupDeleted(streamGroup: StreamGroup): boolean;
|
|
35
|
+
export declare function getIsDataBarrelActive(dataBarrel: DataBarrel): boolean;
|
|
36
|
+
export declare function getIsDataBarrelDeleted(dataBarrel: DataBarrel): boolean;
|
|
37
|
+
export declare function getIsFinal(value: any): value is Final;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { BasePipe } from './entities';
|
|
2
|
+
import type { CreateDebugger } from './entities';
|
|
3
|
+
import type { CreateFill } from './entities';
|
|
4
|
+
import type { ForkInstruction } from './entities';
|
|
5
|
+
import type { HandleEmitStream } from './entities';
|
|
6
|
+
import type { HandleTerminateStream } from './entities';
|
|
7
|
+
import type { LatestInstruction } from './entities';
|
|
8
|
+
import type { LeadingInstruction } from './entities';
|
|
9
|
+
import type { OnceInstruction } from './entities';
|
|
10
|
+
import type { PipeKit } from './entities';
|
|
11
|
+
export type CreatePipeKitOptions = {
|
|
12
|
+
adjuncts: BasePipe[];
|
|
13
|
+
createDebugger?: CreateDebugger;
|
|
14
|
+
createFill: CreateFill;
|
|
15
|
+
createStreamEmitHandler?: () => HandleEmitStream;
|
|
16
|
+
createStreamTerminateHandler?: () => HandleTerminateStream;
|
|
17
|
+
displayName?: string;
|
|
18
|
+
fork?: boolean;
|
|
19
|
+
};
|
|
20
|
+
export declare function createPipeKit({ adjuncts, createFill, createStreamEmitHandler, createStreamTerminateHandler, ...opts }: CreatePipeKitOptions): PipeKit;
|
|
21
|
+
export declare const latest: LatestInstruction;
|
|
22
|
+
export declare const leading: LeadingInstruction;
|
|
23
|
+
export declare const once: OnceInstruction;
|
|
24
|
+
export declare const fork: ForkInstruction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const debugInstruction: import("../entities").DebugInstruction;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function deepCopy<TData extends any>(data: TData): TData;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { OnParentPipeStreamEmit } from './ParentPipe';
|
|
2
|
+
import type { OnParentPipeStreamTerminate } from './ParentPipe';
|
|
3
|
+
export type Connect<TValue extends any = any> = {
|
|
4
|
+
(onStreamEmit: OnParentPipeStreamEmit<TValue>, onStreamTerminate: OnParentPipeStreamTerminate): number;
|
|
5
|
+
};
|
|
6
|
+
export type DownstreamConnection<TValue extends any = any> = {
|
|
7
|
+
onStreamEmit: OnParentPipeStreamEmit<TValue>;
|
|
8
|
+
onStreamTerminate: OnParentPipeStreamTerminate<TValue>;
|
|
9
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Stream } from './Stream';
|
|
2
|
+
export declare const dataType: {
|
|
3
|
+
readonly data: "data";
|
|
4
|
+
readonly error: "error";
|
|
5
|
+
};
|
|
6
|
+
export type DataType = (typeof dataType)[keyof typeof dataType];
|
|
7
|
+
export declare const dataBarrelStatus: {
|
|
8
|
+
readonly active: "active";
|
|
9
|
+
readonly deleted: "deleted";
|
|
10
|
+
};
|
|
11
|
+
export type DataBarrelStatus = (typeof dataBarrelStatus)[keyof typeof dataBarrelStatus];
|
|
12
|
+
export type DataBarrelRegistry = Record<symbol, DataBarrel>;
|
|
13
|
+
export type DataBarrel<TData extends any = any> = {
|
|
14
|
+
/**
|
|
15
|
+
* Available if import.meta.env.DEV
|
|
16
|
+
*/
|
|
17
|
+
uniqKey: symbol;
|
|
18
|
+
papa: symbol;
|
|
19
|
+
data: TData;
|
|
20
|
+
dataType: DataType;
|
|
21
|
+
final: boolean;
|
|
22
|
+
status: DataBarrelStatus;
|
|
23
|
+
emittedStreams: Stream[];
|
|
24
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export type CreateFill<TValue extends any = any, TArgs extends any[] = any[]> = {
|
|
2
|
+
(terminateAll: TerminateAll): Fill<TValue, TArgs>;
|
|
3
|
+
};
|
|
4
|
+
export type Fill<TValue extends any = any, TArgs extends any[] = any[]> = {
|
|
5
|
+
(args: TArgs, emitData: Emit<TValue | Final<TValue>>, emitError: Emit): void | undefined | null | Retire;
|
|
6
|
+
/**
|
|
7
|
+
* Available if import.meta.env.DEV
|
|
8
|
+
*/
|
|
9
|
+
displayName?: string;
|
|
10
|
+
};
|
|
11
|
+
export type TerminateAll = {
|
|
12
|
+
(): void;
|
|
13
|
+
};
|
|
14
|
+
export type Emit<TValue extends any = any> = {
|
|
15
|
+
(value: TValue): void;
|
|
16
|
+
};
|
|
17
|
+
export type Retire = {
|
|
18
|
+
(): void;
|
|
19
|
+
};
|
|
20
|
+
export declare const FINAL_TYPE: unique symbol;
|
|
21
|
+
export type Final<TValue extends any = any> = {
|
|
22
|
+
type: typeof FINAL_TYPE;
|
|
23
|
+
value: TValue;
|
|
24
|
+
};
|
|
25
|
+
export declare function FINAL<TValue extends any = undefined>(value?: TValue): Final<TValue>;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { DataBarrel } from './DataBarrel';
|
|
2
|
+
import type { PipeState } from './Pipe';
|
|
3
|
+
import type { Stream } from './Stream';
|
|
4
|
+
import type { StreamGroup } from './StreamGroup';
|
|
5
|
+
export declare const INSTRUCTION_ENTITY_TYPE: unique symbol;
|
|
6
|
+
export type Instruction<TInstructionType extends symbol = symbol> = {
|
|
7
|
+
entityType: typeof INSTRUCTION_ENTITY_TYPE;
|
|
8
|
+
instructionType: TInstructionType;
|
|
9
|
+
};
|
|
10
|
+
export declare const DISPLAY_NAME_INSTRUCTION_TYPE: unique symbol;
|
|
11
|
+
export type DisplayNameInstruction = Instruction<typeof DISPLAY_NAME_INSTRUCTION_TYPE> & {
|
|
12
|
+
displayName: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const DEBUG_INSTRUCTION_TYPE: unique symbol;
|
|
15
|
+
export type DebugInstruction = Instruction<typeof DEBUG_INSTRUCTION_TYPE> & {
|
|
16
|
+
createDebugger: CreateDebugger;
|
|
17
|
+
displayName?: string;
|
|
18
|
+
};
|
|
19
|
+
export type CreateDebugger = {
|
|
20
|
+
(displayName: string): Debugger;
|
|
21
|
+
};
|
|
22
|
+
export type Debugger = {
|
|
23
|
+
onPipeCreate: (message: string, data: {
|
|
24
|
+
pipeState: PipeState;
|
|
25
|
+
}) => void;
|
|
26
|
+
onPipeEvent: (message: string, data: {
|
|
27
|
+
stream?: Stream;
|
|
28
|
+
dataBarrel?: DataBarrel;
|
|
29
|
+
streamGroup?: StreamGroup;
|
|
30
|
+
pipeState: PipeState;
|
|
31
|
+
}) => void;
|
|
32
|
+
onStreamGroupCreate: (message: string, data: {
|
|
33
|
+
parentPipeIndex?: number;
|
|
34
|
+
stream?: Stream;
|
|
35
|
+
streamGroup: StreamGroup;
|
|
36
|
+
pipeState: PipeState;
|
|
37
|
+
}) => void;
|
|
38
|
+
onStreamGroupEvent: (message: string, data: {
|
|
39
|
+
parentPipeIndex?: number;
|
|
40
|
+
stream?: Stream;
|
|
41
|
+
streamGroup: StreamGroup;
|
|
42
|
+
pipeState: PipeState;
|
|
43
|
+
}) => void;
|
|
44
|
+
onEmit: (message: string, data: {
|
|
45
|
+
dataBarrel: DataBarrel;
|
|
46
|
+
streamGroup: StreamGroup;
|
|
47
|
+
pipeState: PipeState;
|
|
48
|
+
}) => void;
|
|
49
|
+
onDataBarrelEvent: (message: string, data: {
|
|
50
|
+
dataBarrel: DataBarrel;
|
|
51
|
+
streamGroup: StreamGroup;
|
|
52
|
+
pipeState: PipeState;
|
|
53
|
+
}) => void;
|
|
54
|
+
onStreamEvent: (message: string, data: {
|
|
55
|
+
stream: Stream;
|
|
56
|
+
dataBarrel: DataBarrel;
|
|
57
|
+
streamGroup: StreamGroup;
|
|
58
|
+
pipeState: PipeState;
|
|
59
|
+
}) => void;
|
|
60
|
+
onError: (error: Error, pipeState: PipeState) => void;
|
|
61
|
+
};
|
|
62
|
+
export declare const CONTROL_INSTRUCTION_TYPE: unique symbol;
|
|
63
|
+
export type ControlInstruction<TControlInstructionType extends symbol = symbol> = Instruction<typeof CONTROL_INSTRUCTION_TYPE> & {
|
|
64
|
+
controlInstructionType: TControlInstructionType;
|
|
65
|
+
createStreamEmitHandler?: () => HandleEmitStream;
|
|
66
|
+
createStreamTerminateHandler?: () => HandleTerminateStream;
|
|
67
|
+
};
|
|
68
|
+
export type HandleEmitStream = {
|
|
69
|
+
(debug: null | Debugger, pipeState: PipeState, streamGroup: StreamGroup, stream: Stream): boolean;
|
|
70
|
+
};
|
|
71
|
+
export type HandleTerminateStream = {
|
|
72
|
+
(debug: null | Debugger, pipeState: PipeState, streamGroup: StreamGroup, stream: Stream): boolean;
|
|
73
|
+
};
|
|
74
|
+
export declare const LATEST_INSTRUCTION_TYPE: unique symbol;
|
|
75
|
+
export type LatestInstruction = ControlInstruction<typeof LATEST_INSTRUCTION_TYPE>;
|
|
76
|
+
export declare const LEADING_INSTRUCTION_TYPE: unique symbol;
|
|
77
|
+
export type LeadingInstruction = ControlInstruction<typeof LEADING_INSTRUCTION_TYPE>;
|
|
78
|
+
export declare const ONCE_INSTRUCTION_TYPE: unique symbol;
|
|
79
|
+
export type OnceInstruction = ControlInstruction<typeof ONCE_INSTRUCTION_TYPE>;
|
|
80
|
+
export declare const FORK_INSTRUCTION_TYPE: unique symbol;
|
|
81
|
+
export type ForkInstruction = ControlInstruction<typeof FORK_INSTRUCTION_TYPE>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { BasePipe } from './Pipe';
|
|
2
|
+
import type { Stream } from './Stream';
|
|
3
|
+
export type ParentPipes<TAdjuncts extends any = any> = TAdjuncts extends [infer TAdjunct, ...(infer TRestAdjuncts)] ? TAdjunct extends BasePipe ? [TAdjunct, ...ParentPipes<TRestAdjuncts>] : ParentPipes<TRestAdjuncts> : TAdjuncts extends (infer TAdjunct)[] ? Extract<TAdjunct, BasePipe>[] : [];
|
|
4
|
+
export type OnParentPipeStreamEmit<TValue extends any = any> = {
|
|
5
|
+
(stream: Stream<TValue>): void;
|
|
6
|
+
};
|
|
7
|
+
export type OnParentPipeStreamTerminate<TValue extends any = any> = {
|
|
8
|
+
(stream: Stream<TValue>): void;
|
|
9
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { Adjunct } from './Adjunct';
|
|
2
|
+
import type { Connect } from './Connect';
|
|
3
|
+
import type { DownstreamConnection } from './Connect';
|
|
4
|
+
import type { DataType } from './DataBarrel';
|
|
5
|
+
import type { TerminateAll } from './Fill';
|
|
6
|
+
import type { CreateDebugger } from './Instruction';
|
|
7
|
+
import type { ParentPipes } from './ParentPipe';
|
|
8
|
+
import type { StreamGroupRegistry } from './StreamGroup';
|
|
9
|
+
export declare const PIPE_ENTITY_TYPE: unique symbol;
|
|
10
|
+
export type BasePipe<TValue extends any = any> = {
|
|
11
|
+
entityType: typeof PIPE_ENTITY_TYPE;
|
|
12
|
+
type: DataType;
|
|
13
|
+
/**
|
|
14
|
+
* Available if import.meta.env.DEV
|
|
15
|
+
*/
|
|
16
|
+
uniqKey: symbol;
|
|
17
|
+
connect: Connect<TValue>;
|
|
18
|
+
/**
|
|
19
|
+
* Available if import.meta.env.DEV
|
|
20
|
+
*/
|
|
21
|
+
displayName?: null | string;
|
|
22
|
+
/**
|
|
23
|
+
* Available if import.meta.env.DEV
|
|
24
|
+
*/
|
|
25
|
+
createDebugger?: null | CreateDebugger;
|
|
26
|
+
};
|
|
27
|
+
export type DataPipe<TValue extends any = any> = BasePipe<TValue> & {
|
|
28
|
+
error: BasePipe;
|
|
29
|
+
};
|
|
30
|
+
export type UniversalDataPipe<TValue extends any = any> = Promise<any> extends TValue ? DataPipe<Exclude<TValue, Promise<any>> | (Extract<TValue, Promise<any>> extends Promise<infer TPromiseValue> ? TPromiseValue : never)> : BasePipe<TValue>;
|
|
31
|
+
export type BasePipeWithCreateDebugger<TValue extends any = any> = BasePipe<TValue> & {
|
|
32
|
+
/**
|
|
33
|
+
* Available if import.meta.env.DEV
|
|
34
|
+
*/
|
|
35
|
+
createDebugger: CreateDebugger;
|
|
36
|
+
};
|
|
37
|
+
export type BasePipeWithDisplayName<TValue extends any = any> = BasePipe<TValue> & {
|
|
38
|
+
/**
|
|
39
|
+
* Available if import.meta.env.DEV
|
|
40
|
+
*/
|
|
41
|
+
displayName: string;
|
|
42
|
+
};
|
|
43
|
+
export type PipeKit<TValue extends any = any> = [pipe: DataPipe<TValue>, terminateAll: TerminateAll, controlled: boolean];
|
|
44
|
+
export type PipeState<TValue extends any = any, TError extends any = any, TAdjuncts extends Adjunct[] = Adjunct[]> = {
|
|
45
|
+
/**
|
|
46
|
+
* Available if import.meta.env.DEV
|
|
47
|
+
*/
|
|
48
|
+
displayName?: string;
|
|
49
|
+
parentPipes: ParentPipes<TAdjuncts>;
|
|
50
|
+
streamGroupRegistry: StreamGroupRegistry<TAdjuncts>;
|
|
51
|
+
dataPipe: CommonPipeState<TValue>;
|
|
52
|
+
errorPipe: CommonPipeState<TError>;
|
|
53
|
+
};
|
|
54
|
+
export type CommonPipeState<TValue extends any = any> = {
|
|
55
|
+
uniqKey: symbol;
|
|
56
|
+
downstreamConnections: DownstreamConnection<TValue>[];
|
|
57
|
+
};
|