Skip to content

Commit 6cea357

Browse files
authored
Do not import ReducerAction type (#47)
* Do not import ReducerAction type * use cache v4 * empty commit
1 parent 281b2e8 commit 6cea357

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
run: echo "::set-output name=dir::$(yarn cache dir)"
2323

2424
- name: Cache dependencies
25-
uses: actions/cache@v1
25+
uses: actions/cache@v4
2626
with:
2727
path: ${{ steps.yarn-cache.outputs.dir }}
2828
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
run: echo "::set-output name=dir::$(yarn cache dir)"
2121

2222
- name: Cache dependencies
23-
uses: actions/cache@v1
23+
uses: actions/cache@v4
2424
with:
2525
path: ${{ steps.yarn-cache.outputs.dir }}
2626
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ import {
88
Dispatch,
99
Reducer,
1010
ReducerState,
11-
ReducerAction,
1211
} from 'react';
1312

13+
type ReducerAction<R extends Reducer<any, any>> = R extends Reducer<any, infer A> ? A : never;
14+
1415
const isClient = (
1516
typeof window !== 'undefined'
1617
&& !/ServerSideRendering/.test(window.navigator && window.navigator.userAgent)

0 commit comments

Comments
 (0)