Skip to content

Commit

Permalink
chore: format
Browse files Browse the repository at this point in the history
  • Loading branch information
fantasticsoul committed Jan 22, 2024
1 parent 2506666 commit f20b158
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion packages/helux-core/src/consts/user.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { VER as limuVer } from 'limu';

export const VER = '4.2.2';
export const VER = '4.2.3';

export const LIMU_VER = limuVer;

Expand Down
2 changes: 1 addition & 1 deletion packages/helux-core/src/factory/creator/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ export function parseCreateMutateOpt(descOrOptions?: string | IRunMutateOptions)
if (typeof descOrOptions === 'string') {
return { desc: descOrOptions, strict, throwErr, extraArgs };
}
return { desc, strict, throwErr, extraArgs , ...descOrOptions};
return { desc, strict, throwErr, extraArgs, ...descOrOptions };
}

export function parseWatchOptions(forEffect: boolean, options?: WatchOptionsType) {
Expand Down
4 changes: 2 additions & 2 deletions packages/helux-core/src/types/api.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
|------------------------------------------------------------------------------------------------
| [email protected].2
| [email protected].3
| A state library core that integrates atom, signal, collection dep, derive and watch,
| it supports all react like frameworks ( including react 18 ).
|------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -68,7 +68,7 @@ import type {
} from './base';

export declare const cst: {
VER: '4.2.2';
VER: '4.2.3';
LIMU_VER: string;
EVENT_NAME: {
/** 共享状态创建时的事件 */
Expand Down
26 changes: 12 additions & 14 deletions packages/helux/__tests__/atom/mutateAsync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,21 +103,19 @@ describe('create atom mutate', () => {
const [numAtom, setAtom] = atom(1);
// 有fn,未指定 immediate 时,task 首次不执行
return new Promise<void>((resolve) => {
const [bAtom, , ctx] = atom(0, {
mutate: [
{
deps: () => [numAtom.val],
task: async ({ extraArgs }) => {
expect(extraArgs).toBe(1);
resolve()
const [bAtom, , ctx] = atom(0, {
mutate: [
{
deps: () => [numAtom.val],
task: async ({ extraArgs }) => {
expect(extraArgs).toBe(1);
resolve();
},
desc: 'm1',
},
desc: 'm1',
},
],
});
ctx.runMutateTask({desc:'m1',extraArgs: 1 });
],
});
ctx.runMutateTask({ desc: 'm1', extraArgs: 1 });
});
});


});

0 comments on commit f20b158

Please sign in to comment.