@cleanweb/react 1.1.1-beta.3 → 1.1.1-beta.4
Sign up to get free protection for your applications and to get access to all the features.
package/build/base/methods.d.ts
CHANGED
@@ -3,6 +3,7 @@ export declare class ComponentMethods<TState extends object, TProps extends obje
|
|
3
3
|
state: TCleanState<TState>;
|
4
4
|
props: TProps;
|
5
5
|
}
|
6
|
-
type UseMethods = <
|
6
|
+
type UseMethods = <Class extends TypeofClass & Constructor<InstanceType<TypeofClass>>, // = TMethods & Cons,
|
7
|
+
TypeofClass extends typeof ComponentMethods<object, object>>(Methods: Class, state: InstanceType<Class>['state'], props: InstanceType<Class>['props']) => InstanceType<Class>;
|
7
8
|
export declare const useMethods: UseMethods;
|
8
9
|
export {};
|
package/build/classy/logic.d.ts
CHANGED
@@ -12,7 +12,7 @@ type LogicClassParams = ConstructorParameters<typeof ComponentLogic>;
|
|
12
12
|
export interface IComponentLogicClass<Instance extends ComponentLogic<o, o, o> = ComponentLogic, Params extends LogicClassParams = LogicClassParams> extends Constructor<Instance, Params> {
|
13
13
|
getInitialState: (props?: Instance['props']) => TState<Instance['state']>;
|
14
14
|
}
|
15
|
-
export type TBaseComponentLogic = IComponentLogicClass<ComponentLogic<
|
16
|
-
type UseLogic = <Class extends typeof ComponentLogic<o, o, o>>(Methods: Class
|
15
|
+
export type TBaseComponentLogic = IComponentLogicClass<ComponentLogic<any, any, any>>;
|
16
|
+
type UseLogic = <Class extends TypeofClass & IComponentLogicClass<InstanceType<TypeofClass>>, TypeofClass extends typeof ComponentLogic<o, o, o>>(Methods: Class, ...props: valueof<InstanceType<Class>['props']> extends never ? ([] | [EmptyObject] | [InstanceType<Class>['props']]) : [InstanceType<Class>['props']]) => InstanceType<Class>;
|
17
17
|
export declare const useLogic: UseLogic;
|
18
18
|
export {};
|