Skip to content

effector Halley 22.2.0

Choose a tag to compare

@zerobias zerobias released this 01 Feb 04:56
· 2011 commits to master since this release
f3a44f6
  • Added filter option to sample, thereby making guard an alias (issue #521)
sample({
  clock: submitPasswordEvent,
  source: $store,
  filter: (state: AuthFlowState) => state is WaitingPasswordState,
  fn: (waitingPasswordState, clock) => waitingPasswordState.password,
  target: submitPassowrdFx,
})
  • Added clock option to split (issue #537)
split({
  clock: submit,
  source: $form,
  match: $mode,
  cases: {
    draft: saveFormDraftFx,
    send: sendFormToBackendFx,
  }
})
  • Improved sample type checking:
    • Fixed cases when target units becomes compatible with any type (issue #600)
    • Fixed cases when method call being marked as error when it perfectly correct
    • Removed vague "incompatible unit in target" error
    • Error messages now explicitly tells which type is given by source and which one is expected by target
    • 16 overloads was merged into single one to improve clarity of error messages. Will remove a lot of noise from IDE output thereby improving developer expirience
  • Improved split type checking:
    • Fixed a case when units in cases becomes compatible with any type
    • Removed vague "incompatible unit in target" error
    • Error messages now explicitly tells which type is given by source and which one is expected by failed target case
  • Added jsdoc documentation for all top level methods. Will be used by IDE such as VS Code and Webstorm to provide better developer expirience
  • Derived units in target of sample, guard, split and forward are deprecated (issue #563)
  • Imperative calls of derived units created by merge, sample and split are deprecated
  • Imperative calls of events and effects in pure functions are deprecated (issue #541)
  • restore($store) is deprecated (issue #571)
  • Effects created by attach got correct name for use in developer tools like effector-logger (issue #527)
  • Fixed a case when sample/guard pass obsolete data from it's source store (issue #544)
  • Fixed data race when using combine with fork api (issue #613)
  • Fixed cases when effector/babel-plugin changes function calls which it should avoid (issue #603)
  • Fixed support for multiple passes of effector/babel-plugin (issue #601)
  • Fixed combine support for units with large union types (issue #531)
  • Fixed support for calls without payload for Event<unknown> (PR #454)
  • Fixed circular reference warning during import of typings (issue #578)