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
There are a few issues in this repo reporting problems or unexpected behavior related to how parameters are merged into factories. Under the hood Fishery uses a deep-merge behavior. It uses mergeWith from Lodash and adding some customizations to the merge behavior (explicit undefined will override params instead of being ignored). It also does some fancy Typescript typing to explain how the parameters are deep-merged.
I propose allowing Fishery users to override the default merge behavior with their own merge strategies. This should give more control over merge behavior. Perhaps you could choose from deep merge, shallow merge, or a custom merge. This might also give more control over Typescript types, by specifying the input and output types of the merge function.
The text was updated successfully, but these errors were encountered:
There are a few issues in this repo reporting problems or unexpected behavior related to how parameters are merged into factories. Under the hood Fishery uses a deep-merge behavior. It uses
mergeWith
from Lodash and adding some customizations to the merge behavior (explicitundefined
will override params instead of being ignored). It also does some fancy Typescript typing to explain how the parameters are deep-merged.Issues related to parameter merging behavior:
I propose allowing Fishery users to override the default merge behavior with their own merge strategies. This should give more control over merge behavior. Perhaps you could choose from deep merge, shallow merge, or a custom merge. This might also give more control over Typescript types, by specifying the input and output types of the merge function.
The text was updated successfully, but these errors were encountered: