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 user data ('ipaObject') retrieved from an API call contains partial information and might have some undefined parameters that need to be handled afterward in multiple parts of the code, making it cumbersome to maintain.
That is why a new way to normalize the values (especially the undefined ones) and parse them into a proper data type is needed to better manage the parameters and prevent over-adapting the code to a specific use case.
E.g.: <parameterName>: undefined ---> Needs to be parsed into a specific type (string, number, etc.) to start working with it. If this value is explicitly set as empty ("", 0, etc.), this is considered as a modified value by the current code logic (as per here), but the value has not changed at all (i.e.: no difference between 'undefined' and "").
Goals
Normalize the values of the 'User' object to properly detect any change in any of those.
Acceptance criteria
Handle the 'User' object retrieved from the API call response.
Process the 'User' data and analyze how the types are defined in the global object (i.e.: the 'User' data type).
All processed objects need to have all their values/parameters initialized into a specific data type and should be taken as a reference to detect any modification in the fields.
Refer to the TypeScript documentation to handle the data types.
The text was updated successfully, but these errors were encountered:
Context
The user data ('ipaObject') retrieved from an API call contains partial information and might have some undefined parameters that need to be handled afterward in multiple parts of the code, making it cumbersome to maintain.
That is why a new way to normalize the values (especially the undefined ones) and parse them into a proper data type is needed to better manage the parameters and prevent over-adapting the code to a specific use case.
E.g.:
<parameterName>: undefined
---> Needs to be parsed into a specific type (string, number, etc.) to start working with it. If this value is explicitly set as empty ("", 0, etc.), this is considered as a modified value by the current code logic (as per here), but the value has not changed at all (i.e.: no difference between 'undefined' and "").Goals
Acceptance criteria
The text was updated successfully, but these errors were encountered: