Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

initial migration to @most/core #39

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,7 @@
}
},

"plugins": [
"react",
"better",
"fp",
"import",
"promise",
"standard"
],
"plugins": ["react", "better", "fp", "import", "promise", "standard"],

"extends": ["standard-pure-fp", "standard-react"],

Expand All @@ -43,6 +36,8 @@
"fp/no-nil": 0,
"fp/no-unused-expression": 0,
"fp/no-mutating-methods": 0,
"operator-linebreak": "off",
"indent": "off",

// Extra React rules not provided by standard-react
"react/react-in-jsx-scope": 2,
Expand Down
12 changes: 6 additions & 6 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
MiddlewareAPI,
StoreEnhancer,
} from 'redux'
import { Stream } from 'most'
import { Stream } from '@most/core'

/*****************************************
Type abbreviations:
Expand All @@ -24,14 +24,14 @@ export interface DefaultAction extends Action<ActionType> {
// for the original, redux-observable style API
export type OriginalApiEpic<S, A extends Action = DefaultAction> = (
actionStream: Stream<A>,
middlewareApi: MiddlewareAPI<Dispatch<A>, S>,
middlewareApi: MiddlewareAPI<Dispatch<A>, S>
) => Stream<A>

// for the newer, declarative only API, which takes in a state stream
// to sample via the withState utility instead of exposing dispatch/getState
export type DeclarativeApiEpic<S, A extends Action = DefaultAction> = (
actionStream: Stream<A>,
stateStream: Stream<S>,
stateStream: Stream<S>
) => Stream<A>

export type Epic<S, A extends Action = DefaultAction> =
Expand All @@ -54,7 +54,7 @@ export declare function createStateStreamEnhancer<
>(epicMiddleware: EpicMiddleware<S, A>): StoreEnhancer<S>

export declare function combineEpics<S, A extends Action = DefaultAction>(
epicsArray: Epic<S, A>[],
epicsArray: Epic<S, A>[]
): Epic<S, A>

// overloads exist due to select being a curried function
Expand Down Expand Up @@ -82,11 +82,11 @@ export declare function selectArray<
// overloads exist due to withState being a curried function
export declare function withState<S, A extends Action = DefaultAction>(
stateStream: Stream<S>,
actionStream: Stream<A>,
actionStream: Stream<A>
): Stream<[S, A]>

export declare function withState<S, A extends Action = DefaultAction>(
stateStream: Stream<S>,
stateStream: Stream<S>
): (actionStream: Stream<A>) => Stream<[S, A]>

export const EPIC_END = '@@redux-most/EPIC_END'
Expand Down
Loading