Skip to content

Commit

Permalink
feat: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
runjuu committed Dec 25, 2021
1 parent 6503fb1 commit 616b72a
Show file tree
Hide file tree
Showing 5 changed files with 1,722 additions and 2,439 deletions.
2 changes: 1 addition & 1 deletion .prettierrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
"trailingComma": "all",
"singleQuote": true,
"arrowParens": "always",
"jsxBracketSameLine": false,
"bracketSameLine": false,
"bracketSpacing": true
}
40 changes: 20 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,29 +46,29 @@
"peerDependencies": {
"mobx": "^6.0.0 || ^5.0.0",
"mobx-state-tree": "^5.0.0 || ^4.0.0",
"rxjs": "^6.0.0"
"rxjs": "^7.0.0 || 6.0.0"
},
"devDependencies": {
"@types/jest": "^26.0.20",
"@typescript-eslint/eslint-plugin": "^4.18.0",
"@typescript-eslint/parser": "^4.18.0",
"eslint": "^7.22.0",
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-prettier": "^3.3.1",
"eslint-plugin-react": "^7.22.0",
"@types/jest": "^27.0.3",
"@typescript-eslint/eslint-plugin": "^5.8.0",
"@typescript-eslint/parser": "^5.8.0",
"eslint": "^8.5.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-react": "^7.28.0",
"format-package": "^6.1.0",
"husky": "^5.1.3",
"jest": "^26.6.3",
"lint-staged": "^10.5.4",
"mobx": "^6.1.8",
"mobx-state-tree": "^5.0.1",
"husky": "^7.0.4",
"jest": "^27.4.5",
"lint-staged": "^12.1.4",
"mobx": "^6.3.10",
"mobx-state-tree": "^5.1.0",
"npm-run-all": "^4.1.5",
"prettier": "^2.2.1",
"rxjs": "^6.6.6",
"ts-jest": "^26.5.3",
"ts-node": "^9.1.1",
"tsd": "^0.14.0",
"tslib": "^2.1.0",
"typescript": "^4.2.3"
"prettier": "^2.5.1",
"rxjs": "^7.4.0",
"ts-jest": "^27.1.2",
"ts-node": "^10.4.0",
"tsd": "^0.19.0",
"tslib": "^2.3.1",
"typescript": "^4.5.4"
}
}
5 changes: 2 additions & 3 deletions src/effect/doll-effect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,8 @@ export function dollEffect(
})

return (payload: any, handler: any) => {
const promise = (typeof handler === 'function'
? handler(signalSource.asObservable())
: signalSource
const promise = (
typeof handler === 'function' ? handler(signalSource.asObservable()) : signalSource
)
.pipe(take(1))
.toPromise()
Expand Down
10 changes: 5 additions & 5 deletions src/reaction$/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ import { Observable } from 'rxjs'

export function reaction$<T>(
expression: (r: IReactionPublic) => T,
opts: Omit<IReactionOptions, 'fireImmediately'> & { fireImmediately: true },
opts: IReactionOptions<T, true>,
): Observable<{ current: T; prev: T | undefined; r: IReactionPublic }>

export function reaction$<T>(
expression: (r: IReactionPublic) => T,
opts?: IReactionOptions,
opts?: IReactionOptions<T, false>,
): Observable<{ current: T; prev: T; r: IReactionPublic }>

export function reaction$<T>(
export function reaction$<T, FireImmediately extends boolean = false>(
expression: (r: IReactionPublic) => T,
opts?: IReactionOptions,
): Observable<{ current: T; prev: T; r: IReactionPublic }> {
opts?: IReactionOptions<T, FireImmediately>,
): Observable<{ current: T; prev?: T; r: IReactionPublic }> {
return new Observable((observer) => {
const dispose = reaction(
expression,
Expand Down

0 comments on commit 616b72a

Please sign in to comment.