This repository has been archived by the owner on Oct 28, 2024. It is now read-only.
Behavior of Pxth<V | null | undefined>
is wrong when settings type.
#28
Labels
bug
Something isn't working
Describe the bug
The bug occurs when trying to set some value on inner path of
Pxth<V | undefined | null>
(where V is some generic object type). By default, lodash'sset
function when executed in the same manner_.set({ a: null }, ['a', 'b'], 42)
creates empty object in-place recursively, overriding any primitive value. However, new constructed object is not of typeV | undefined | null
.So,
Pxth
should know which type it can GET and which type it can SET.To Reproduce
Expected behavior
TS error should be there when trying to set value on children of nullable object.
Additional context
In addition, this bug is related to another problem:
The text was updated successfully, but these errors were encountered: