reactish-state 0.10.1 → 0.10.3

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.
@@ -1,6 +1,7 @@
1
1
  import type { Middleware } from '../common';
2
- declare type ReduxDevtools = (options?: {
2
+ type ReduxDevtools = (options?: {
3
3
  name?: string;
4
4
  }) => Middleware | undefined;
5
5
  declare const reduxDevtools: ReduxDevtools;
6
+ export type { ReduxDevtools };
6
7
  export { reduxDevtools };
@@ -1,2 +1,2 @@
1
- export { applyPlugin } from './applyPlugin';
2
- export { reduxDevtools } from './reduxDevtools';
1
+ export * from './applyPlugin';
2
+ export * from './reduxDevtools';
@@ -1,6 +1,7 @@
1
1
  import type { Plugin } from '../common';
2
- declare type ReduxDevtools = (options?: {
2
+ type ReduxDevtools = (options?: {
3
3
  name?: string;
4
4
  }) => Plugin | undefined;
5
5
  declare const reduxDevtools: ReduxDevtools;
6
+ export type { ReduxDevtools };
6
7
  export { reduxDevtools };
@@ -1,9 +1,9 @@
1
1
  import type { Reactish, Plugin, Config } from '../common';
2
- declare type ReactishArray = Reactish<unknown>[];
3
- declare type ReactishValueArray<R extends ReactishArray> = {
2
+ type ReactishArray = Reactish<unknown>[];
3
+ type ReactishValueArray<R extends ReactishArray> = {
4
4
  [index in keyof R]: ReturnType<R[index]['get']>;
5
5
  };
6
- declare type SelectorFunc<R extends ReactishArray, T> = (...args: ReactishValueArray<R>) => T;
6
+ type SelectorFunc<R extends ReactishArray, T> = (...args: ReactishValueArray<R>) => T;
7
7
  interface Selector {
8
8
  <R extends ReactishArray, T>(...items: [...R, SelectorFunc<R, T>]): Reactish<T>;
9
9
  <R extends ReactishArray, T>(...items: [...R, SelectorFunc<R, T>, Config]): Reactish<T>;
@@ -12,4 +12,5 @@ declare const createSelector: ({ plugin }?: {
12
12
  plugin?: Plugin | undefined;
13
13
  }) => Selector;
14
14
  declare const selector: Selector;
15
+ export type { Selector };
15
16
  export { selector, createSelector };
@@ -1,5 +1,5 @@
1
1
  import type { Reactish, Setter, Config, Middleware } from '../common';
2
- declare type ActionCreator<T, A> = ((set: Setter<T>, get: () => T) => A) | null | undefined;
2
+ type ActionCreator<T, A> = ((set: Setter<T>, get: () => T) => A) | null | undefined;
3
3
  interface State<T, A = unknown, C extends ActionCreator<T, A> = undefined> extends Reactish<T> {
4
4
  set: Setter<T>;
5
5
  actions: C extends undefined ? never : A;
@@ -8,4 +8,5 @@ declare const createState: ({ middleware }?: {
8
8
  middleware?: Middleware | undefined;
9
9
  }) => <T, A>(initialValue: T, actionCreator?: ActionCreator<T, A>, config?: Config) => State<T, A, ActionCreator<T, A>>;
10
10
  declare const state: <T, A>(initialValue: T, actionCreator?: ActionCreator<T, A>, config?: Config) => State<T, A, ActionCreator<T, A>>;
11
+ export type { State, ActionCreator };
11
12
  export { state, createState };
@@ -1,16 +0,0 @@
1
- function _extends() {
2
- _extends = Object.assign ? Object.assign.bind() : function (target) {
3
- for (var i = 1; i < arguments.length; i++) {
4
- var source = arguments[i];
5
- for (var key in source) {
6
- if (Object.prototype.hasOwnProperty.call(source, key)) {
7
- target[key] = source[key];
8
- }
9
- }
10
- }
11
- return target;
12
- };
13
- return _extends.apply(this, arguments);
14
- }
15
-
16
- export { _extends as extends };