redux-starter-kit
Advanced tools
Comparing version 0.8.0 to 0.8.1
@@ -51,3 +51,3 @@ import { Reducer } from 'redux'; | ||
*/ | ||
extraReducers?: CaseReducers<State, any>; | ||
extraReducers?: CaseReducers<NoInfer<State>, any>; | ||
} | ||
@@ -54,0 +54,0 @@ declare type PayloadActions<Types extends keyof any = string> = Record<Types, PayloadAction>; |
export declare type IsAny<T, True, False = never> = (True | False) extends (T extends never ? True : False) ? True : False; | ||
export declare type IsUnknown<T, True, False = never> = unknown extends T ? IsAny<T, False, True> : False; | ||
export declare type IsEmptyObj<T, True, False = never> = T extends any ? {} extends T ? IsUnknown<T, False, IsAny<T, False, True>> : False : never; | ||
export declare type IsEmptyObj<T, True, False = never> = T extends any ? keyof T extends never ? IsUnknown<T, False, True> : False : never; | ||
/** | ||
@@ -10,3 +10,3 @@ * returns True if TS version is above 3.5, False if below. | ||
* */ | ||
export declare type AtLeastTS35<True, False> = IsUnknown<ReturnType<(<T>() => T)>, True, False>; | ||
export declare type AtLeastTS35<True, False> = [True, False][IsUnknown<ReturnType<(<T>() => T)>, 0, 1>]; | ||
export declare type IsUnknownOrNonInferrable<T, True, False> = AtLeastTS35<IsUnknown<T, True, False>, IsEmptyObj<T, True, False>>; |
{ | ||
"name": "redux-starter-kit", | ||
"version": "0.8.0", | ||
"version": "0.8.1", | ||
"description": "A simple set of tools to make using Redux easier", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/reduxjs/redux-starter-kit", |
@@ -76,3 +76,3 @@ import { Reducer } from 'redux' | ||
*/ | ||
extraReducers?: CaseReducers<State, any> | ||
extraReducers?: CaseReducers<NoInfer<State>, any> | ||
} | ||
@@ -234,3 +234,3 @@ | ||
const finalCaseReducers = { ...extraReducers, ...sliceCaseReducersByType } | ||
const reducer = createReducer(initialState, finalCaseReducers) | ||
const reducer = createReducer(initialState, finalCaseReducers as any) | ||
@@ -237,0 +237,0 @@ return { |
@@ -16,4 +16,4 @@ // taken from https://github.com/joonhocho/tsdef | ||
export type IsEmptyObj<T, True, False = never> = T extends any | ||
? {} extends T | ||
? IsUnknown<T, False, IsAny<T, False, True>> | ||
? keyof T extends never | ||
? IsUnknown<T, False, True> | ||
: False | ||
@@ -28,7 +28,7 @@ : never | ||
* */ | ||
export type AtLeastTS35<True, False> = IsUnknown< | ||
export type AtLeastTS35<True, False> = [True, False][IsUnknown< | ||
ReturnType<<T>() => T>, | ||
True, | ||
False | ||
> | ||
0, | ||
1 | ||
>] | ||
@@ -35,0 +35,0 @@ export type IsUnknownOrNonInferrable<T, True, False> = AtLeastTS35< |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
222203