The brand new New way in WH5.7 is probably using setFrontendData for these things on the response:
setFrontendData<Type extends keyof FrontendDataTypes>(dataObject: Type, data: FrontendDataTypes[Type]) {
picking it up using getFrontendData
*and* declaring the format in your frontend, like wrd:auth does here:
declare module "@webhare/frontend" {
interface FrontendDataTypes {
"wrd:auth": {
/** WRDAuth cookiename (used to verify configuration settings) */
cookiename: string;
};
}
}
This will also replace/be recommended instead of jsobjconfig/jssiteconfig as there is no clean way to get those interfaces to be properly typed in TypeScript
It's still new and experimental (and I think we also need to upgrade it to a typed stringify so you can transfer Money & Date) but I don't expect the interfaces to really change anymore - the concept is trivial and generic enough now.