@equinor/fusion-observable
Advanced tools
Comparing version 2.2.0 to 2.3.0
@@ -1,5 +0,6 @@ | ||
export * from './ReactiveObservable'; | ||
export * from './FlowSubject'; | ||
export * from './ActionError'; | ||
export * from './types'; | ||
export { FlowSubject as ReactiveObservable } from './FlowSubject'; | ||
export { createAction, createAsyncAction } from './create-action'; | ||
//# sourceMappingURL=index.js.map |
import { useState } from 'react'; | ||
import { ReactiveObservable } from '../ReactiveObservable'; | ||
export const useObservable = (reducer, initial) => useState(new ReactiveObservable(reducer, initial))[0]; | ||
import { FlowSubject } from '../FlowSubject'; | ||
export const useObservable = (reducer, initial) => useState(new FlowSubject(reducer, initial))[0]; | ||
//# sourceMappingURL=useObservable.js.map |
@@ -1,4 +0,5 @@ | ||
export * from './ReactiveObservable'; | ||
export * from './FlowSubject'; | ||
export * from './ActionError'; | ||
export * from './types'; | ||
export { FlowSubject as ReactiveObservable } from './FlowSubject'; | ||
export { createAction, createAsyncAction } from './create-action'; |
@@ -1,3 +0,3 @@ | ||
import { ReactiveObservable } from '../ReactiveObservable'; | ||
import { FlowSubject } from '../FlowSubject'; | ||
import type { Action, Reducer } from '../types'; | ||
export declare const useObservable: <S, A extends Action<string> = Action<string>>(reducer: Reducer<S, A>, initial: S) => ReactiveObservable<S, A>; | ||
export declare const useObservable: <S, A extends Action<string> = Action<string>>(reducer: Reducer<S, A>, initial: S) => FlowSubject<S, A>; |
@@ -1,10 +0,10 @@ | ||
import { ReactiveObservable } from '../ReactiveObservable'; | ||
import { FlowSubject } from '../FlowSubject'; | ||
import { Action, Effect, ActionType, ExtractAction } from '../types'; | ||
export interface useObservableEffect<S, A extends Action = Action, TType extends ActionType<A> = ActionType<A>> { | ||
(subject: ReactiveObservable<S, A>, type: TType, effect?: Effect<ExtractAction<A, TType>, S>): void; | ||
(subject: FlowSubject<S, A>, type: TType, effect?: Effect<ExtractAction<A, TType>, S>): void; | ||
} | ||
export interface useObservableEffect<S, A extends Action = Action> { | ||
(subject: ReactiveObservable<S, A>, effect: Effect<A, S>): void; | ||
(subject: FlowSubject<S, A>, effect: Effect<A, S>): void; | ||
} | ||
export declare const useObservableEffect: <S, A extends Action<string> = Action<string>, TType extends ActionType<A> = ActionType<A>>(subject: ReactiveObservable<S, A>, effectOrType: TType | Effect<A, S>, effect?: Effect<Extract<A, Action<TType>>, S> | undefined) => void; | ||
export declare const useObservableEffect: <S, A extends Action<string> = Action<string>, TType extends ActionType<A> = ActionType<A>>(subject: FlowSubject<S, A>, effectOrType: TType | Effect<A, S>, effect?: Effect<Extract<A, Action<TType>>, S> | undefined) => void; | ||
export default useObservableEffect; |
@@ -1,4 +0,4 @@ | ||
import { ReactiveObservable } from '../ReactiveObservable'; | ||
import { FlowSubject } from '../FlowSubject'; | ||
import { Action, Epic } from '../types'; | ||
export declare const useObservableEpic: <S, A extends Action<string> = Action<string>>(subject: ReactiveObservable<S, A>, epic: Epic<A, S>) => void; | ||
export declare const useObservableEpic: <S, A extends Action<string> = Action<string>>(subject: FlowSubject<S, A>, epic: Epic<A, S>) => void; | ||
export default useObservableEpic; |
{ | ||
"name": "@equinor/fusion-observable", | ||
"version": "2.2.0", | ||
"version": "2.3.0", | ||
"description": "WIP", | ||
@@ -81,3 +81,3 @@ "private": false, | ||
}, | ||
"gitHead": "8bc00acbf39cd5cdfef3eae3bfc48889a8fd94fa" | ||
"gitHead": "5f2707d200fa0c0d59d5b1bd6cce45f54f5619b0" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
127910
593