@octanejs/redux-toolkit 0.1.7 → 0.1.8
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.
- package/package.json +9 -9
- package/src/query/react/namedHooks.ts +28 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@octanejs/redux-toolkit",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -34,22 +34,22 @@
|
|
|
34
34
|
"./query/react": "./src/query/react/index.ts"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@reduxjs/toolkit": "^2.
|
|
37
|
+
"@reduxjs/toolkit": "^2.12.0",
|
|
38
38
|
"redux": "^5.0.1",
|
|
39
39
|
"reselect": "5.2.0",
|
|
40
|
-
"@octanejs/redux": "0.1.
|
|
40
|
+
"@octanejs/redux": "0.1.10"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"octane": "0.1.
|
|
43
|
+
"octane": "0.1.13"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@tsrx/react": "^0.2.
|
|
46
|
+
"@tsrx/react": "^0.2.46",
|
|
47
47
|
"esbuild": "^0.28.1",
|
|
48
|
-
"react": "^19.2.
|
|
49
|
-
"react-dom": "^19.2.
|
|
48
|
+
"react": "^19.2.7",
|
|
49
|
+
"react-dom": "^19.2.7",
|
|
50
50
|
"react-redux": "9.3.0",
|
|
51
|
-
"vitest": "^4.1.
|
|
52
|
-
"octane": "0.1.
|
|
51
|
+
"vitest": "^4.1.10",
|
|
52
|
+
"octane": "0.1.13"
|
|
53
53
|
},
|
|
54
54
|
"scripts": {
|
|
55
55
|
"test": "vitest run --root ../.. --project redux-toolkit --project redux-toolkit-ssr"
|
|
@@ -8,37 +8,43 @@ import type {
|
|
|
8
8
|
import type { UseInfiniteQuery, UseLazyQuery, UseMutation, UseQuery } from './buildHooks';
|
|
9
9
|
|
|
10
10
|
type QueryHookNames<Definitions extends EndpointDefinitions> = {
|
|
11
|
-
[
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
[
|
|
12
|
+
K in keyof Definitions as Definitions[K] extends {
|
|
13
|
+
type: DefinitionType.query;
|
|
14
|
+
}
|
|
15
|
+
? `use${Capitalize<K & string>}Query`
|
|
16
|
+
: never
|
|
17
|
+
]: UseQuery<Extract<Definitions[K], QueryDefinition<any, any, any, any>>>;
|
|
16
18
|
};
|
|
17
19
|
|
|
18
20
|
type LazyQueryHookNames<Definitions extends EndpointDefinitions> = {
|
|
19
|
-
[
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
[
|
|
22
|
+
K in keyof Definitions as Definitions[K] extends {
|
|
23
|
+
type: DefinitionType.query;
|
|
24
|
+
}
|
|
25
|
+
? `useLazy${Capitalize<K & string>}Query`
|
|
26
|
+
: never
|
|
27
|
+
]: UseLazyQuery<Extract<Definitions[K], QueryDefinition<any, any, any, any>>>;
|
|
24
28
|
};
|
|
25
29
|
|
|
26
30
|
type InfiniteQueryHookNames<Definitions extends EndpointDefinitions> = {
|
|
27
|
-
[
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
31
|
+
[
|
|
32
|
+
K in keyof Definitions as Definitions[K] extends {
|
|
33
|
+
type: DefinitionType.infinitequery;
|
|
34
|
+
}
|
|
35
|
+
? `use${Capitalize<K & string>}InfiniteQuery`
|
|
36
|
+
: never
|
|
37
|
+
]: UseInfiniteQuery<Extract<Definitions[K], InfiniteQueryDefinition<any, any, any, any, any>>>;
|
|
34
38
|
};
|
|
35
39
|
|
|
36
40
|
type MutationHookNames<Definitions extends EndpointDefinitions> = {
|
|
37
|
-
[
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
41
|
+
[
|
|
42
|
+
K in keyof Definitions as Definitions[K] extends {
|
|
43
|
+
type: DefinitionType.mutation;
|
|
44
|
+
}
|
|
45
|
+
? `use${Capitalize<K & string>}Mutation`
|
|
46
|
+
: never
|
|
47
|
+
]: UseMutation<Extract<Definitions[K], MutationDefinition<any, any, any, any>>>;
|
|
42
48
|
};
|
|
43
49
|
|
|
44
50
|
export type HooksWithUniqueNames<Definitions extends EndpointDefinitions> =
|