diff --git a/src/create-handler-map.ts b/src/create-handler-map.ts index e272349..e19845a 100644 --- a/src/create-handler-map.ts +++ b/src/create-handler-map.ts @@ -1,6 +1,7 @@ import { ActionCreator } from './create-action' import { AnyAction } from './action' import { getType } from './get-type' +import { Reducer } from './types' export type HandlerMap = { [key in Actions['type']]: Reducer diff --git a/src/types.d.ts b/src/types.d.ts deleted file mode 100644 index 11b4763..0000000 --- a/src/types.d.ts +++ /dev/null @@ -1 +0,0 @@ -type Reducer = (prevState: State, action: Actions) => State diff --git a/src/types.ts b/src/types.ts new file mode 100644 index 0000000..52e8440 --- /dev/null +++ b/src/types.ts @@ -0,0 +1,4 @@ +export type Reducer = ( + prevState: State, + action: Actions +) => State diff --git a/tsconfig.build.json b/tsconfig.build.json index 787a229..eac0c2c 100644 --- a/tsconfig.build.json +++ b/tsconfig.build.json @@ -1,6 +1,6 @@ { "extends": "./tsconfig.json", - "files": ["./src/index.ts", "./src/types.d.ts"], + "files": ["./src/index.ts"], "include": [], "exclude": [], "compilerOptions": { diff --git a/tsconfig.spec.json b/tsconfig.spec.json index 856bdb0..831918b 100644 --- a/tsconfig.spec.json +++ b/tsconfig.spec.json @@ -1,6 +1,6 @@ { "extends": "./tsconfig.json", - "include": ["./src/**/__tests__/*", "./src/types.d.ts"], + "include": ["./src/**/__tests__/*"], "compilerOptions": { "target": "esnext", "esModuleInterop": true