You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 8, 2024. It is now read-only.
At the moment, the worker completion payload is a Partial. However, this erases type safety for required parameters.
If a programmer really has a Partial, they can put that in the signature.
Changing this will break the compilation of any code that uses type parameters on createWorker, if it relies on the existing implicit Partial<T>.
I don't think many people are using that at the moment - I'll check in Slack.
The benefit of making this change for type safety is significant, and the refactoring to fix the breaking change in users' code is T -> Partial<T> which is minimal and deterministic.
The text was updated successfully, but these errors were encountered:
jwulf
changed the title
Remove Partial<> from Parameterised types on inputs and outputs to Worker
Remove Partial<> from Parameterised type for Worker (complete.success)
Dec 14, 2020
At the moment, the worker completion payload is a Partial. However, this erases type safety for required parameters.
If a programmer really has a Partial, they can put that in the signature.
Changing this will break the compilation of any code that uses type parameters on
createWorker
, if it relies on the existing implicitPartial<T>
.I don't think many people are using that at the moment - I'll check in Slack.
The benefit of making this change for type safety is significant, and the refactoring to fix the breaking change in users' code is
T
->Partial<T>
which is minimal and deterministic.For example:
if the worker really returns only part of the
IndividualResult
type, it will need to be refactored to:The change needs to be made here: https://github.com/zeebe-io/zeebe-client-node-js/blob/master/src/lib/ZBWorkerBase.ts#L275
The text was updated successfully, but these errors were encountered: