Comparing version 0.8.0 to 0.9.0
@@ -1,2 +0,2 @@ | ||
/* hydroxide v0.8.0 */ | ||
/* hydroxide v0.9.0 */ | ||
'use strict'; | ||
@@ -535,3 +535,4 @@ | ||
const newValue = transformer(this.value); | ||
if (this.value === newValue) return; | ||
if (this.value === newValue) return; // @ts-expect-error | ||
this.set(newValue); | ||
@@ -538,0 +539,0 @@ } |
@@ -1,2 +0,2 @@ | ||
/* hydroxide v0.8.0 */ | ||
/* hydroxide v0.9.0 */ | ||
function targetKey(obj, path) { | ||
@@ -531,3 +531,4 @@ if (path.length === 1) return [obj, path[0]]; | ||
const newValue = transformer(this.value); | ||
if (this.value === newValue) return; | ||
if (this.value === newValue) return; // @ts-expect-error | ||
this.set(newValue); | ||
@@ -534,0 +535,0 @@ } |
@@ -6,4 +6,4 @@ import { Subs, Context, GenericPath } from './others'; | ||
type Transform<T> = (oldValue: T) => T; | ||
export type Do<V> = (transform: Transform<V>) => void; | ||
export type Set<V> = (newValue: V) => void; | ||
export type Do<V> = (transform: V extends true | false ? Transform<boolean> : Transform<V>) => void; | ||
export type Set<V> = (newValue: V extends true | false ? boolean : V) => void; | ||
export type Clear = () => void; | ||
@@ -10,0 +10,0 @@ export type PushList<V> = (values: ArrayItem<V>[]) => void; |
{ | ||
"name": "hydroxide", | ||
"description": "Next Generation Reactive Framework", | ||
"version": "0.8.0", | ||
"version": "0.9.0", | ||
"author": "Manan Tank", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
52270