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
Object.Partial with deep flag changes the value of a key if it is an array by mapping array of type Type[] to (Type | undefined)[] | undefined, so it changes type type of an array.
Is it intentional or a bug? And if it is intentional, then how to avoid mapping values of the array.
Reproduce the bug
importtype{Object}from'ts-toolbelt'consttest: Object.Partial<{foo: string[]},'deep'>={}asanytest.foo// here
Expected behavior
foo?: (string | undefined)[] | undefined should be foo?: string[] | undefined
Possible Solution
Not sure if it was intentional
Screenshots
Additional context
The text was updated successfully, but these errors were encountered:
馃悶 Bug Report
Describe the bug
Object.Partial with deep flag changes the value of a key if it is an array by mapping array of type Type[] to (Type | undefined)[] | undefined, so it changes type type of an array.
Is it intentional or a bug? And if it is intentional, then how to avoid mapping values of the array.
Reproduce the bug
Expected behavior
foo?: (string | undefined)[] | undefined
should befoo?: string[] | undefined
Possible Solution
Not sure if it was intentional
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: