Open Platonn opened 1 week ago
Have you considered creating a separate ticket to track deprecations which eventually will be removed and attaching its ID to all related places?
During QA, I faced an error:
Probably due to missing unknown
type in DeprecatedLoadWishListFailPayload
interface DeprecatedLoadWishListFailPayload
extends Omit<LoadWishListFailPayload, 'error'> {
error: null | undefined;
}
In previous past PR within this Epic branch, we've made breaking changes - changing constructor signatures of ngrx actions from having
error: any
toerror: <something more specific>
(i.e.error: ErrorActionType
). In this PR, we revert this change - allowing forerror: any
but at the same time deprecating it. Moreover, the non-deprecated constructor requires the value to be non-null, non-undefined.fixes https://jira.tools.sap/browse/CXSPA-7198 (it's part 1/2; the part 2/2 - adding
implements ErrorAction
- will arrive in a separate PR for the breviety of this PR)QA steps To conduct the QA steps, please add the code snippets given below to your
app.module.ts
(please make sure to import the pasted items; note: for auto-adding missing imports in VSCode you might find this trick helpful).Table of contents:
EntityFailAction
)undefined
errornull
errorany
errorunknown
errorerror?
3rd argument in the actionEntityFailAction
(it's the only one example with optionalerror?
argument. the rest of actions in examples below have a requirederror
param).(screenshot: )![image](https://github.com/SAP/spartacus/assets/4001059/7b430961-bb50-48e5-9c48-eb434d01d457)
⚠️ DEPRECATED UNDEFINED - Verify it's deprecated to pass
undefined
error object to various actions, e.g. that in your VSCode the names of the constructed classes are crossed out:(screenshot: )![image](https://github.com/SAP/spartacus/assets/4001059/72470de1-5af1-4f5e-b102-035dac36364e)
⚠️ DEPREACTED NULL
(screenshot: )![image](https://github.com/SAP/spartacus/assets/4001059/12ad3037-c657-467d-9473-5f0f32763015)
⚠️ DEPRECATED ANY
(screenshot: )![image](https://github.com/SAP/spartacus/assets/4001059/4a2edba1-4b5e-4130-b546-8c1ebf209536)
⚠️ DEPRECATED UNKNOWN
(screenshot: )![image](https://github.com/SAP/spartacus/assets/4001059/dbe8b1d1-562c-46f8-ac63-91ca9159a66d)
✅ VALID PLAIN OBJECT
(screenshot: )![image](https://github.com/SAP/spartacus/assets/4001059/f6dae91d-c527-42f2-b591-76ca5cb5aa77)
✅ VALID EMPTY OBJECT
(screenshot: )![image](https://github.com/SAP/spartacus/assets/4001059/3dbc01ba-187d-46af-b83f-2634c21be515)
✅ VALID EMPTY STRING
(screenshot: )![image](https://github.com/SAP/spartacus/assets/4001059/5ed4662e-fc0a-4431-b3d4-deeba6c87fc4)