@gez/class-state
Advanced tools
Comparing version 0.0.15-alpha.41 to 0.0.15-alpha.42
@@ -5,3 +5,3 @@ { | ||
"scripts": { | ||
"lint:js": "eslint . --ext .js,.mjs,.cjs,.ts,.vue --fix", | ||
"lint:js": "biome check --write --no-errors-on-unmatched", | ||
"lint:css": "stylelint '**/*.{css,vue}' --fix --aei", | ||
@@ -17,7 +17,7 @@ "lint:type": "tsc --noEmit", | ||
"devDependencies": { | ||
"@gez/lint": "^0.0.15-alpha.41", | ||
"@biomejs/biome": "1.9.2", | ||
"@gez/lint": "0.0.9", | ||
"@types/node": "20.12.12", | ||
"@vitest/coverage-v8": "1.6.0", | ||
"@vue/compiler-dom": "^3.5.6", | ||
"eslint": "8.57.0", | ||
"stylelint": "16.5.0", | ||
@@ -29,3 +29,3 @@ "typescript": "5.4.5", | ||
}, | ||
"version": "0.0.15-alpha.41", | ||
"version": "0.0.15-alpha.42", | ||
"type": "module", | ||
@@ -36,3 +36,4 @@ "private": false, | ||
"import": "./dist/index.mjs", | ||
"require": "./dist/index.cjs" | ||
"require": "./dist/index.cjs", | ||
"types": "./dist/index.d.ts" | ||
} | ||
@@ -49,3 +50,3 @@ }, | ||
], | ||
"gitHead": "b029ed22414f4c3489d17dce10d3e858431202b3" | ||
"gitHead": "e1e92b26dc1f997357f6ed46cabbcc49862ad539" | ||
} |
@@ -380,4 +380,4 @@ import { assert, test } from 'vitest'; | ||
class Count { | ||
public value: number = 0; | ||
public text: string = ''; | ||
public value = 0; | ||
public text = ''; | ||
public $inc() { | ||
@@ -422,3 +422,3 @@ this.value++; | ||
class Count { | ||
public value: number = 0; | ||
public value = 0; | ||
public $inc() { | ||
@@ -443,3 +443,3 @@ this.value++; | ||
class Count { | ||
public value: number = 0; | ||
public value = 0; | ||
public $inc() { | ||
@@ -446,0 +446,0 @@ this.value++; |
/* eslint-disable @typescript-eslint/no-this-alias */ | ||
import { produce } from 'immer'; | ||
import { getStateContext, type State, type StateContext } from './create'; | ||
import { type State, type StateContext, getStateContext } from './create'; | ||
export type StoreParams = Record<string, any>; | ||
@@ -215,3 +215,3 @@ export type StoreConstructor = new (cacheKey?: string) => any; | ||
const prevState = connectContext.state; | ||
let result; | ||
let result: unknown; | ||
const nextState = produce(prevState, (draft) => { | ||
@@ -255,3 +255,3 @@ connectContext._drafting = true; | ||
); | ||
let storeState; | ||
let storeState: Record<string, any>; | ||
if (fullPath in state.value) { | ||
@@ -258,0 +258,0 @@ storeState = { ...store, ...state.value[fullPath] }; |
@@ -17,3 +17,3 @@ import { assert, test } from 'vitest'; | ||
const user = connectStore(User, 'user'); | ||
let updateValue; | ||
let updateValue: string | undefined; | ||
watch( | ||
@@ -47,3 +47,3 @@ () => { | ||
user.$setName('test'); | ||
let updateValue; | ||
let updateValue: string | undefined; | ||
watch( | ||
@@ -50,0 +50,0 @@ () => { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
72663
2537