Skip to content

Commit

Permalink
feat: merge mergeState
Browse files Browse the repository at this point in the history
  • Loading branch information
acrazing committed Nov 3, 2024
1 parent 3f9681e commit f835c9a
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@amos/root",
"private": true,
"version": "0.3.0-beta.31",
"version": "0.3.0-beta.32",
"license": "MIT",
"workspaces": [
"packages/*",
Expand Down
2 changes: 1 addition & 1 deletion packages/amos-babel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-babel",
"version": "0.3.0-beta.31",
"version": "0.3.0-beta.32",
"private": true,
"files": [],
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/amos-boxes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-boxes",
"version": "0.3.0-beta.31",
"version": "0.3.0-beta.32",
"private": true,
"files": []
}
3 changes: 1 addition & 2 deletions packages/amos-boxes/src/objectBox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import { Box, Mutation, Selector } from 'amos-core';
import { resolveFuncValue, shallowEqual, type ValueOrFunc } from 'amos-utils';

export interface ObjectBox<T extends object> extends Box<Readonly<T>> {
mergeState(state: Partial<T>): Mutation<Readonly<T>>;
mergeState(next: (state: Readonly<T>) => Partial<T>): Mutation<Readonly<T>>;
mergeState(state: ValueOrFunc<Partial<Readonly<T>>, [Readonly<T>]>): Mutation<Readonly<T>>;
set<K extends keyof T>(key: K, value: T[K]): Mutation<T>;
get<K extends keyof T>(key: K): Selector<[K], T[K]>;
pick<Ks extends Array<keyof T>>(...keys: Ks): Selector<Ks, Pick<T, Ks[number]>>;
Expand Down
2 changes: 1 addition & 1 deletion packages/amos-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-core",
"version": "0.3.0-beta.31",
"version": "0.3.0-beta.32",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos-io/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-io",
"version": "0.3.0-beta.31",
"version": "0.3.0-beta.32",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos-persist/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-persist",
"version": "0.3.0-beta.31",
"version": "0.3.0-beta.32",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-react",
"version": "0.3.0-beta.31",
"version": "0.3.0-beta.32",
"private": true,
"files": [],
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/amos-shapes/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-shapes",
"version": "0.3.0-beta.31",
"version": "0.3.0-beta.32",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos-testing/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-testing",
"version": "0.3.0-beta.31",
"version": "0.3.0-beta.32",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos-typescript/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-typescript",
"version": "0.3.0-beta.31",
"version": "0.3.0-beta.32",
"private": true,
"files": [],
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/amos-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos-utils",
"version": "0.3.0-beta.31",
"version": "0.3.0-beta.32",
"private": true,
"files": []
}
2 changes: 1 addition & 1 deletion packages/amos/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amos",
"version": "0.3.0-beta.31",
"version": "0.3.0-beta.32",
"description": "An out-of-the-box state management library designed for your large-scale projects.",
"keywords": [
"amos",
Expand Down
12 changes: 12 additions & 0 deletions packages/amos/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,20 @@ export {
} from 'amos-shapes';
export {
AmosObject,
AnyFunc,
Enhancer,
ID,
IsAny,
IsNever,
IsNoType,
IsUnknown,
JSONState,
Unsubscribe,
ValueOrArray,
ValueOrConstructor,
ValueOrFunc,
ValueOrPromise,
ValueOrReadonlyArray,
arrayEqual,
isAmosObject,
shallowEqual,
Expand Down

0 comments on commit f835c9a

Please sign in to comment.