Rename createReduxClient to createActions

This commit is contained in:
Jerko Steiner 2019-08-01 20:01:30 +07:00
parent daf32de431
commit 9aba9000b7
2 changed files with 4 additions and 4 deletions

View File

@ -8,13 +8,13 @@ import {AddressInfo} from 'net'
import {Server} from 'http' import {Server} from 'http'
import {TPendingActions, TAllActions} from './types' import {TPendingActions, TAllActions} from './types'
import {combineReducers} from 'redux' import {combineReducers} from 'redux'
import {createReduxClient, createReducer} from './redux' import {createActions, createReducer} from './redux'
import {createRemoteClient} from './remote' import {createRemoteClient} from './remote'
import {createStore} from '@rondo/client' import {createStore} from '@rondo/client'
import {jsonrpc} from './express' import {jsonrpc} from './express'
import {keys} from 'ts-transformer-keys' import {keys} from 'ts-transformer-keys'
describe('createReduxClient', () => { describe('createActions', () => {
interface IService { interface IService {
add(a: number, b: number): number add(a: number, b: number): number
@ -77,7 +77,7 @@ describe('createReduxClient', () => {
function getClient() { function getClient() {
const remoteClient = createRemoteClient<IService>( const remoteClient = createRemoteClient<IService>(
baseUrl, '/service', keys<IService>()) baseUrl, '/service', keys<IService>())
const client = createReduxClient(remoteClient, 'myService') const client = createActions(remoteClient, 'myService')
const defaultState = { const defaultState = {
loading: 0, loading: 0,

View File

@ -8,7 +8,7 @@ import {
} from './types' } from './types'
import {createRemoteClient} from './remote' import {createRemoteClient} from './remote'
export function createReduxClient<T, ActionType extends string>( export function createActions<T, ActionType extends string>(
client: TAsyncified<T>, client: TAsyncified<T>,
type: ActionType, type: ActionType,
) { ) {