@cleanweb/react 2.1.3 → 2.1.4
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.
@@ -2,8 +2,6 @@ import { CleanStateBase } from './class';
|
|
2
2
|
/**
|
3
3
|
* Base type for an `initialState` object.
|
4
4
|
* It is a regular object type, with some reserved keys excluded.
|
5
|
-
*
|
6
|
-
* @_category Types
|
7
5
|
*/
|
8
6
|
export type TStateData = object & {
|
9
7
|
[Key in keyof CleanStateBase<{}>]?: never;
|
@@ -13,8 +11,6 @@ export type TStateData = object & {
|
|
13
11
|
* object of type `TState`.
|
14
12
|
*
|
15
13
|
* @typeParam TState - The type of your `initialState` object.
|
16
|
-
*
|
17
|
-
* @_category Types
|
18
14
|
*/
|
19
15
|
export type TCleanState<TState extends TStateData> = (CleanStateBase<TState> & Omit<TState, keyof CleanStateBase<{}>>);
|
20
16
|
/**
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import { TPropsBase } from '../../../classy/logic';
|
2
1
|
import { ComponentInstance } from '..';
|
3
|
-
type UIClassParam = typeof ComponentInstance<NonNullable<
|
2
|
+
type UIClassParam = typeof ComponentInstance<NonNullable<any>>;
|
4
3
|
type UIProplessClassParam = typeof ComponentInstance<null>;
|
5
4
|
export type UseInstance = {
|
6
5
|
<Class extends UIProplessClassParam>(Methods: Class): InstanceType<Class>;
|
@@ -23,9 +23,6 @@ export type TPropsBase = NonPrimitive | null;
|
|
23
23
|
* Call the {@link useLogic} hook inside your function component to instantiate the class.
|
24
24
|
*
|
25
25
|
* @typeParam TProps - {@include ./types/tprops.md}
|
26
|
-
*
|
27
|
-
* @group ComponentLogic
|
28
|
-
* @_category External Classes
|
29
26
|
*/
|
30
27
|
export declare class ComponentLogic<TProps extends TPropsBase = null> {
|
31
28
|
/**
|
@@ -25,9 +25,6 @@ var state_1 = require("../../base/state");
|
|
25
25
|
* Call the {@link useLogic} hook inside your function component to instantiate the class.
|
26
26
|
*
|
27
27
|
* @typeParam TProps - {@include ./types/tprops.md}
|
28
|
-
*
|
29
|
-
* @group ComponentLogic
|
30
|
-
* @_category External Classes
|
31
28
|
*/
|
32
29
|
var ComponentLogic = /** @class */ (function () {
|
33
30
|
function ComponentLogic() {
|
@@ -1,8 +1,8 @@
|
|
1
|
-
import type { ComponentLogic
|
1
|
+
import type { ComponentLogic } from '..';
|
2
2
|
/*************************************
|
3
3
|
* # Hooks *
|
4
4
|
**************************************/
|
5
|
-
type ULClassParam = typeof ComponentLogic<NonNullable<
|
5
|
+
type ULClassParam = typeof ComponentLogic<NonNullable<any>>;
|
6
6
|
type ULProplessClassParam = typeof ComponentLogic<null>;
|
7
7
|
export type UseLogic = {
|
8
8
|
<Class extends ULProplessClassParam>(Methods: Class): InstanceType<Class>;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@cleanweb/react",
|
3
|
-
"version": "2.1.
|
3
|
+
"version": "2.1.4",
|
4
4
|
"description": "A suite of helpers for writing cleaner React function components.",
|
5
5
|
"engines": {
|
6
6
|
"node": ">=18"
|
@@ -22,10 +22,10 @@
|
|
22
22
|
"./all": "./build/index.js"
|
23
23
|
},
|
24
24
|
"scripts": {
|
25
|
-
"prebuild": "rimraf ./build",
|
25
|
+
"prebuild": "rimraf ./build && npm run build:docs",
|
26
26
|
"build": "tsc && tsc-alias",
|
27
27
|
"serve-docs": "serve docs",
|
28
|
-
"postbuild": "copyfiles tsconfig.json build
|
28
|
+
"postbuild": "copyfiles tsconfig.json build",
|
29
29
|
"build:docs": "typedoc",
|
30
30
|
"_": "",
|
31
31
|
"prepublishOnly": "npm run build",
|