@react-pakistan/util-functions 1.12.13 → 1.12.15
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/action-creator-factories/empty-action-creator.d.ts +1 -1
- package/action-creator-factories/payload-action-creator.d.ts +1 -1
- package/action-creator-factories/types.d.ts +4 -4
- package/general/countries.d.ts +1 -1
- package/hooks/use-position.d.ts +3 -3
- package/hooks/use-toggle-state.d.ts +1 -1
- package/local-storage/type.d.ts +1 -1
- package/package.json +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IEmptyAction } from './types';
|
|
2
|
-
|
|
2
|
+
type createEmptyAction<T extends string> = () => IEmptyAction<T>;
|
|
3
3
|
export declare const emptyActionCreator: <T extends string>(actionType: T) => createEmptyAction<T>;
|
|
4
4
|
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { IPayloadAction } from './types';
|
|
2
|
-
|
|
2
|
+
type createPayloadAction<T extends string, D> = (data: D) => IPayloadAction<T, D>;
|
|
3
3
|
export declare const payloadActionCreator: <T extends string, D>(actionType: T) => createPayloadAction<T, D>;
|
|
4
4
|
export {};
|
|
@@ -10,8 +10,8 @@ export interface IAction {
|
|
|
10
10
|
type: string;
|
|
11
11
|
data?: any;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
14
|
-
export
|
|
13
|
+
export type TActionCreator = (...args: Array<any>) => IAction;
|
|
14
|
+
export type TAction<AC extends TActionCreator> = ReturnType<AC>;
|
|
15
15
|
interface IMap {
|
|
16
16
|
[K: string]: TActionCreator;
|
|
17
17
|
}
|
|
@@ -23,7 +23,7 @@ interface IMap {
|
|
|
23
23
|
* type CfdActionTypeMap = TActionMap<typeof CfdActions>;
|
|
24
24
|
* type onChangeAction = TCfdActionMap['onChange']
|
|
25
25
|
*/
|
|
26
|
-
export
|
|
26
|
+
export type TActionMap<T extends IMap> = {
|
|
27
27
|
[K in keyof T]: TAction<T[K]>;
|
|
28
28
|
};
|
|
29
29
|
/**
|
|
@@ -44,5 +44,5 @@ export declare type TActionMap<T extends IMap> = {
|
|
|
44
44
|
* }
|
|
45
45
|
* };
|
|
46
46
|
*/
|
|
47
|
-
export
|
|
47
|
+
export type TActionsMap<T extends IMap> = TActionMap<T>[keyof TActionMap<T>];
|
|
48
48
|
export {};
|
package/general/countries.d.ts
CHANGED
package/hooks/use-position.d.ts
CHANGED
|
@@ -8,17 +8,17 @@
|
|
|
8
8
|
*/
|
|
9
9
|
/** End file docs */
|
|
10
10
|
import { RefObject } from 'react';
|
|
11
|
-
|
|
11
|
+
type PositionRef = {
|
|
12
12
|
offsetLeft: 0 | null;
|
|
13
13
|
offsetRight: 0 | null;
|
|
14
14
|
offsetTop: 0 | null;
|
|
15
15
|
offsetBottom: 0 | null;
|
|
16
16
|
};
|
|
17
|
-
|
|
17
|
+
type StateX = {
|
|
18
18
|
xLeft: 0 | null;
|
|
19
19
|
xRight: 0 | null;
|
|
20
20
|
};
|
|
21
|
-
|
|
21
|
+
type StateY = {
|
|
22
22
|
yTop: 0 | null;
|
|
23
23
|
yBottom: 0 | null;
|
|
24
24
|
};
|
package/local-storage/type.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type AllowedTypes = boolean | string | number | Record<string, unknown> | null | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@react-pakistan/util-functions",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.15",
|
|
4
4
|
"description": "A library of all util functions",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -38,25 +38,25 @@
|
|
|
38
38
|
"homepage": "https://github.com/react-pakistan/util-functions#readme",
|
|
39
39
|
"dependencies": {},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@babel/core": "^7.20.
|
|
41
|
+
"@babel/core": "^7.20.5",
|
|
42
42
|
"@babel/eslint-parser": "^7.19.1",
|
|
43
43
|
"@babel/preset-typescript": "^7.18.6",
|
|
44
44
|
"@microsoft/tsdoc": "^0.14.2",
|
|
45
|
-
"@react-pakistan/eslint-config-shared": "^1.4.
|
|
46
|
-
"@types/jest": "^29.2.
|
|
45
|
+
"@react-pakistan/eslint-config-shared": "^1.4.48",
|
|
46
|
+
"@types/jest": "^29.2.3",
|
|
47
47
|
"@types/lodash.curry": "^4.1.7",
|
|
48
48
|
"@types/node": "^18.11.9",
|
|
49
49
|
"@types/react-redux": "^7.1.24",
|
|
50
50
|
"@types/styled-components": "^5.1.26",
|
|
51
|
-
"@typescript-eslint/eslint-plugin": "^5.
|
|
52
|
-
"@typescript-eslint/parser": "^5.
|
|
51
|
+
"@typescript-eslint/eslint-plugin": "^5.45.0",
|
|
52
|
+
"@typescript-eslint/parser": "^5.45.0",
|
|
53
53
|
"date-fns": "^2.29.3",
|
|
54
54
|
"date-fns-tz": "^1.3.7",
|
|
55
|
-
"eslint": "^8.
|
|
55
|
+
"eslint": "^8.28.0",
|
|
56
56
|
"eslint-plugin-import": "^2.26.0",
|
|
57
57
|
"husky": "^8.0.2",
|
|
58
58
|
"jest": "^29.3.1",
|
|
59
|
-
"lint-staged": "^13.0.
|
|
59
|
+
"lint-staged": "^13.0.4",
|
|
60
60
|
"lodash.curry": "^4.1.1",
|
|
61
61
|
"lodash.isequal": "^4.5.0",
|
|
62
62
|
"react": "^18.2.0",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"rimraf": "^3.0.2",
|
|
65
65
|
"ts-jest": "^29.0.3",
|
|
66
66
|
"ts-loader": "^9.4.1",
|
|
67
|
-
"typescript": "^4.
|
|
67
|
+
"typescript": "^4.9.3"
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@types/react-redux": "^7.1.24",
|