Skip to content

Commit

Permalink
Merge pull request #1017 from effector/backport-effector-23-types
Browse files Browse the repository at this point in the history
Backport effector 23 types (effector 22.8.8 release)
  • Loading branch information
zerobias committed Nov 27, 2023
2 parents b7770df + 46e5f4a commit 784a3a1
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

See also [separate changelogs for each library](https://changelog.effector.dev/)

## effector 22.8.8

- Add new types from effector 23: `UnitTargetable`, `EventCallable` and `StoreWritable` as aliases to improve migration experience and ecosystem compatibility

## effector 22.8.7

- Fix `combine` function called twice on first `allSettled` call ([PR #984](https://github.com/effector/effector/pull/984))
Expand Down
6 changes: 6 additions & 0 deletions packages/effector/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,8 @@ export interface Unit<T> {
readonly __: T
}

export type UnitTargetable<T> = Unit<T>

export type CompositeName = {
shortName: string
fullName: string
Expand Down Expand Up @@ -148,6 +150,8 @@ export interface Event<Payload> extends Unit<Payload> {
shortName: string
}

export type EventCallable<Payload> = Event<Payload>

/**
* Container for (possibly async) side effects
*/
Expand Down Expand Up @@ -236,6 +240,8 @@ export interface Store<State> extends Unit<State> {
reinit?: Event<void>
}

export type StoreWritable<State> = Store<State>

export const is: {
unit(obj: unknown): obj is Unit<any>
store(obj: unknown): obj is Store<any>
Expand Down
2 changes: 1 addition & 1 deletion packages/effector/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "effector",
"version": "22.8.7",
"version": "22.8.8",
"description": "Business logic with ease",
"main": "effector.cjs.js",
"module": "effector.mjs",
Expand Down
2 changes: 1 addition & 1 deletion tools/builder/packages.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const keywords = [
]

const version = {
effector: '22.8.7',
effector: '22.8.8',
'effector-react': '22.5.4',
'effector-vue': '22.2.0',
'effector-solid': '0.22.7',
Expand Down

0 comments on commit 784a3a1

Please sign in to comment.