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
The result is { '1': 1, '2': 2 } while my expectation is that it would be { 'key-1': 1, 'key-2': 2 }. The static type of result is never as there is no guard within Record which would check for Transform. Is this something that could be added? Interested to hear your thoughts before trying to add it myself.
The text was updated successfully, but these errors were encountered:
I have the assumption that Record type keys could be transformed e.g. the following way:
This is a general limitation with Transforms. As of the current version, Transform types cannot be used to transform Record keys, but do agree this feature would be ideal. The way to approach this is to wrap the Record in a exterior transform.
Hey there,
I have the assumption that Record type keys could be transformed e.g. the following way:
The
result
is{ '1': 1, '2': 2 }
while my expectation is that it would be{ 'key-1': 1, 'key-2': 2 }
. The static type ofresult
isnever
as there is no guard withinRecord
which would check forTransform
. Is this something that could be added? Interested to hear your thoughts before trying to add it myself.The text was updated successfully, but these errors were encountered: