@purr-core/utils.definitions 0.0.3 → 0.0.5
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/dist/_types.d.ts +0 -30
- package/package.json +1 -1
package/dist/_types.d.ts
CHANGED
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { ReactElement, ReactNode } from 'react';
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* A type alias for `any`. This type can represent any value.
|
|
5
3
|
*
|
|
@@ -7,25 +5,6 @@ import { ReactElement, ReactNode } from 'react';
|
|
|
7
5
|
* Use this type with caution as it disables type checking for the value it is assigned to.
|
|
8
6
|
*/
|
|
9
7
|
export type TAny = any;
|
|
10
|
-
/**
|
|
11
|
-
* Type definition for a React component function.
|
|
12
|
-
*
|
|
13
|
-
* @typedef {TComponent}
|
|
14
|
-
*
|
|
15
|
-
* @param {...TAny} args - The arguments passed to the component.
|
|
16
|
-
*
|
|
17
|
-
* @returns {ReactNode} - The rendered React node.
|
|
18
|
-
*/
|
|
19
|
-
export type TComponent = (...args: TAny) => ReactNode;
|
|
20
|
-
/**
|
|
21
|
-
* A type representing a higher-order component (HOC) function.
|
|
22
|
-
*
|
|
23
|
-
* This function takes a React element or node as an argument and returns a React node.
|
|
24
|
-
*
|
|
25
|
-
* @param component - The React element or node to be wrapped by the HOC.
|
|
26
|
-
* @returns A new React node after applying the HOC.
|
|
27
|
-
*/
|
|
28
|
-
export type THighOrderComponent = (component: ReactElement | ReactNode) => ReactNode;
|
|
29
8
|
/**
|
|
30
9
|
* A type representing a function that iterates over an array.
|
|
31
10
|
*
|
|
@@ -36,15 +15,6 @@ export type THighOrderComponent = (component: ReactElement | ReactNode) => React
|
|
|
36
15
|
* @returns An unknown value.
|
|
37
16
|
*/
|
|
38
17
|
export type TIterator = <T>(value: T, index?: number, array?: T[]) => unknown;
|
|
39
|
-
/**
|
|
40
|
-
* A generic function type that takes an optional parameter of type `T` and returns a value of type `RT`.
|
|
41
|
-
*
|
|
42
|
-
* @template RT - The return type of the function.
|
|
43
|
-
* @template T - The type of the optional parameter.
|
|
44
|
-
* @param item - An optional parameter of type `T`.
|
|
45
|
-
* @returns A value of type `RT`.
|
|
46
|
-
*/
|
|
47
|
-
export type TFunction<RT> = <T>(item?: T) => RT;
|
|
48
18
|
/**
|
|
49
19
|
* Represents the boundary of an asynchronous operation, encapsulating both the result and any potential error.
|
|
50
20
|
*
|