Comparing version 0.4.23 to 0.4.24
@@ -41,7 +41,9 @@ import { FC } from 'react'; | ||
} | [() => T], deps?: any[]): T; | ||
declare function useShared<T>(target: () => (() => T) | { | ||
0: () => T; | ||
} | [() => T]): T; | ||
declare function useShared<M>(target: (new (init?: any) => M | (() => M) | { | ||
0: () => M; | ||
} | [() => M]) | ((init?: any) => M | (() => M) | { | ||
0: () => M; | ||
} | [() => M])): M; | ||
declare function free(): void; | ||
declare function prop(_proto: any, key: any, descriptor?: any): any; | ||
declare function cache(_proto: any, key: any, descriptor: any): any; |
{ | ||
"name": "realar", | ||
"version": "0.4.23", | ||
"version": "0.4.24", | ||
"description": "React state manager", | ||
@@ -88,3 +88,3 @@ "repository": { | ||
}, | ||
"gitHead": "78197c18b47a5fe2c95ace5b19165a830181e8e7" | ||
"gitHead": "630248408f5186e5a85a7b483eedffc6e57e54a5" | ||
} |
@@ -306,4 +306,8 @@ import React, { Context, FC } from 'react'; | ||
function useShared<T>(target: () => (() => T) | { 0: () => T } | [() => T]): T { | ||
return useValue(shared(target)); | ||
function useShared<M>( | ||
target: | ||
| (new (init?: any) => M | (() => M) | { 0: () => M } | [() => M]) | ||
| ((init?: any) => M | (() => M) | { 0: () => M } | [() => M]) | ||
): M { | ||
return useValue(shared(target as any)); | ||
} | ||
@@ -310,0 +314,0 @@ |
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
43383
636