When invoke an asynchronous method, the invoke function return the promise created.

This commit is contained in:
Henrique Gottardi Werlang 2024-04-19 07:56:26 -03:00 committed by Michael Van Canneyt
parent 0e5c9df70b
commit 18a40f92ee

View File

@ -1951,6 +1951,8 @@ begin
if Assigned(ReturnType) then
TValue.Make(ReturnValue, ReturnType.Handle, Result)
else if IsAsyncCall then
TValue.Make(ReturnValue, TypeInfo(TJSPromise), Result)
else if IsConstructor then
TValue.Make(ReturnValue, Instance.TypeInfo, Result)
end;