@hookstate/core
Advanced tools
Comparing version 4.0.0-rc20 to 4.0.0-rc21
@@ -253,3 +253,3 @@ import React from 'react'; | ||
export interface __State<S, E> { | ||
[__state](): [S, E]; | ||
[__state]: [S, E]; | ||
} | ||
@@ -361,6 +361,10 @@ export declare type InferStateValueType<V> = DeepReturnType<V> extends __State<(infer S), (infer _)> ? S : V; | ||
export interface Extension<S, I, E> { | ||
readonly onCreate?: (state: State<S, {}>, extensionsCallbacks: Record<string, (i: State<StateValueAtPath, E & I>) => any>) => { | ||
readonly onCreate?: (state: State<S, {}>, extensionsCallbacks: { | ||
[K in keyof I]: (i: State<StateValueAtPath, E & I>) => I[K]; | ||
}) => { | ||
readonly [K in keyof Required<E>]: (state: State<StateValueAtPath, E & I>) => E[K]; | ||
}; | ||
readonly onInit?: (state: State<S, E & I>, extensionsCallbacks: Record<string, (i: State<StateValueAtPath, E & I>) => any>) => void; | ||
readonly onInit?: (state: State<S, E & I>, extensionsCallbacks: { | ||
[K in keyof E & I]: (i: State<StateValueAtPath, E & I>) => (E & I)[K]; | ||
}) => void; | ||
readonly onPreset?: (state: State<StateValueAtPath, E & I>, value: StateValueAtPath) => void; | ||
@@ -367,0 +371,0 @@ readonly onPremerge?: (state: State<StateValueAtPath, E & I>, value: StateValueAtPath) => void; |
{ | ||
"name": "@hookstate/core", | ||
"version": "4.0.0-rc20", | ||
"version": "4.0.0-rc21", | ||
"description": "The flexible, fast and extendable state management for React that is based on hooks and state usage tracking.", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
537318
4046