Comparing version 0.4.21 to 0.4.22
@@ -26,6 +26,14 @@ import { FC } from 'react'; | ||
declare function shared<M>(target: (new (init?: any) => M) | ((init?: any) => M)): M; | ||
declare const useScoped: <M>(target: (new (init?: any) => M) | ((init?: any) => M)) => M; | ||
declare const useScoped: <M>(target: (new (init?: any) => M | { | ||
0: () => M; | ||
} | [() => M] | (() => M)) | ((init?: any) => M | { | ||
0: () => M; | ||
} | [() => M] | (() => M))) => M; | ||
declare const Scope: FC; | ||
declare function observe<T extends FC>(FunctionComponent: T): T; | ||
declare function useLocal<T extends unknown[], M>(target: (new (...args: T) => M) | ((...args: T) => M), deps?: T): M; | ||
declare function useLocal<T extends unknown[], M>(target: (new (...args: T) => M | (() => M) | { | ||
0: () => M; | ||
} | [() => M]) | ((...args: T) => M | (() => M) | { | ||
0: () => M; | ||
} | [() => M]), deps?: T): M; | ||
declare function useValue<T>(target: (() => T) | { | ||
@@ -32,0 +40,0 @@ 0: () => T; |
{ | ||
"name": "realar", | ||
"version": "0.4.21", | ||
"version": "0.4.22", | ||
"description": "React state manager", | ||
@@ -88,3 +88,3 @@ "repository": { | ||
}, | ||
"gitHead": "d4be49dc08dc7d5d0abe1f0d080c7086a86f4a0a" | ||
"gitHead": "21164c6243f93353ded26494c6f6a6b1325805ac" | ||
} |
@@ -215,3 +215,7 @@ import React, { Context, FC } from 'react'; | ||
const useScoped = <M>(target: (new (init?: any) => M) | ((init?: any) => M)): M => { | ||
const useScoped = <M>( | ||
target: | ||
| (new (init?: any) => M | (() => M) | { 0: () => M } | [() => M]) | ||
| ((init?: any) => M | (() => M) | { 0: () => M } | [() => M]) | ||
): M => { | ||
const context_data = useContext(get_scope_context()); | ||
@@ -263,3 +267,5 @@ if (!context_data) { | ||
function useLocal<T extends unknown[], M>( | ||
target: (new (...args: T) => M) | ((...args: T) => M), | ||
target: | ||
| (new (...args: T) => M | (() => M) | { 0: () => M } | [() => M]) | ||
| ((...args: T) => M | (() => M) | { 0: () => M } | [() => M]), | ||
deps = [] as T | ||
@@ -266,0 +272,0 @@ ): M { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
41772
630