mirror of
https://gitlab.com/freepascal.org/fpc/pas2js.git
synced 2025-08-28 20:30:12 +02:00
When invoke an asynchronous method, the invoke function return the promise created.
This commit is contained in:
parent
0e5c9df70b
commit
18a40f92ee
@ -1951,6 +1951,8 @@ begin
|
|||||||
|
|
||||||
if Assigned(ReturnType) then
|
if Assigned(ReturnType) then
|
||||||
TValue.Make(ReturnValue, ReturnType.Handle, Result)
|
TValue.Make(ReturnValue, ReturnType.Handle, Result)
|
||||||
|
else if IsAsyncCall then
|
||||||
|
TValue.Make(ReturnValue, TypeInfo(TJSPromise), Result)
|
||||||
else if IsConstructor then
|
else if IsConstructor then
|
||||||
TValue.Make(ReturnValue, Instance.TypeInfo, Result)
|
TValue.Make(ReturnValue, Instance.TypeInfo, Result)
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user