so many errors in the structure-view while compilation is no problem

The errors here (constant object cannot ...) are on all "await" calls. e.g. in DoLogin:
public
property currentPerson: TAuthenticatedUser read FcurrentPerson write FcurrentPerson;
procedure ClearStorage;
[async]
function DoLogin(AEmail: string; APassword: string; APlatform: string): TJSXMLHttpRequest;

function TAuthorisation.DoLogin(AEmail, APassword, APlatform: string): TJSXMLHttpRequest;
var
req: TJSXMLHttpRequest;
jsObj, userObj: TJSObject;
userID: string;
begin
SetRequest('/login', httpPOST, Format('{"email": "%s","password": "%s", "platform": "%s"}', [AEmail, APassword, APlatform]));

req := await(TJSXMLHttpRequest, PerformRequestWithCredentials(WebHttpRequest1));

SetCurrentUser(req.response);

Result := req;
end;

Another error (Invalid TypeCats) is here on both typecasts e.g.:

procedure TAuthorisation.SetCurrentUser(AJSValue: TJSValue);
var
jsObj: TJSObject;
Roles: TJSArray;
i: Integer;
begin
jsObj := TJSObject(AJSValue);
jsObj := TJSObject(jsObj['authenticatedUser']);
...

Really annoying: it compiles, but coding is not pleasant in this way...

Any solution?

Regards,

Filip

For better LSP compatibility, use the TAwait construct

var
lValue: TMySpecialType;
begin
lValue := TAwait.Exec(AsyncFunctionReturningThisType);
end;