mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-10 03:49:04 +02:00
webidl: promise: add comment of returntype
This commit is contained in:
parent
7f4841c76d
commit
922210eaa8
@ -554,6 +554,8 @@ begin
|
||||
ProcKind:='function';
|
||||
Sig:=FuncName+Args+': '+ReturnTypeName+Suff+';';
|
||||
end;
|
||||
if ReturnDef is TIDLPromiseTypeDefDefinition then
|
||||
Sig:=Sig+' // Promise<'+TIDLPromiseTypeDefDefinition(ReturnDef).ReturnType.TypeName+'>';
|
||||
AddLn(ProcKind+' '+Sig);
|
||||
|
||||
if not AddFuncBody then continue;
|
||||
|
@ -574,6 +574,7 @@ begin
|
||||
'interface Attr {',
|
||||
' Promise<void> exitFullscreen();',
|
||||
' Promise<any> addCertException(boolean isTemporary);',
|
||||
' Promise<Attr> fly();',
|
||||
'};',
|
||||
''],
|
||||
['Type',
|
||||
@ -585,31 +586,38 @@ begin
|
||||
' --------------------------------------------------------------------}',
|
||||
'',
|
||||
' IJSAttr = interface(IJSObject)',
|
||||
' [''{74BB0007-0E0F-3C31-A77E-B1C656002861}'']',
|
||||
' function exitFullscreen: IJSPromise;',
|
||||
' function addCertException(aIsTemporary: Boolean): IJSPromise;',
|
||||
' [''{74BB0007-0E0F-3C5D-B270-B1C656002861}'']',
|
||||
' function exitFullscreen: IJSPromise; // Promise<void>',
|
||||
' function addCertException(aIsTemporary: Boolean): IJSPromise; // Promise<any>',
|
||||
' function fly: IJSPromise; // Promise<Attr>',
|
||||
' end;',
|
||||
'',
|
||||
' TJSAttr = class(TJSObject,IJSAttr)',
|
||||
' Private',
|
||||
' Public',
|
||||
' function exitFullscreen: IJSPromise;',
|
||||
' function addCertException(aIsTemporary: Boolean): IJSPromise;',
|
||||
' function exitFullscreen: IJSPromise; // Promise<void>',
|
||||
' function addCertException(aIsTemporary: Boolean): IJSPromise; // Promise<any>',
|
||||
' function fly: IJSPromise; // Promise<Attr>',
|
||||
' class function Cast(Intf: IJSObject): IJSAttr;',
|
||||
' end;',
|
||||
'',
|
||||
'implementation',
|
||||
'',
|
||||
'function TJSAttr.exitFullscreen: IJSPromise;',
|
||||
'function TJSAttr.exitFullscreen: IJSPromise; // Promise<void>',
|
||||
'begin',
|
||||
' Result:=InvokeJSObjectResult(''exitFullscreen'',[],TJSPromise) as IJSPromise;',
|
||||
'end;',
|
||||
'',
|
||||
'function TJSAttr.addCertException(aIsTemporary: Boolean): IJSPromise;',
|
||||
'function TJSAttr.addCertException(aIsTemporary: Boolean): IJSPromise; // Promise<any>',
|
||||
'begin',
|
||||
' Result:=InvokeJSObjectResult(''addCertException'',[aIsTemporary],TJSPromise) as IJSPromise;',
|
||||
'end;',
|
||||
'',
|
||||
'function TJSAttr.fly: IJSPromise; // Promise<Attr>',
|
||||
'begin',
|
||||
' Result:=InvokeJSObjectResult(''fly'',[],TJSPromise) as IJSPromise;',
|
||||
'end;',
|
||||
'',
|
||||
'class function TJSAttr.Cast(Intf: IJSObject): IJSAttr;',
|
||||
'begin',
|
||||
' Result:=TJSAttr.JOBCast(Intf);',
|
||||
|
Loading…
Reference in New Issue
Block a user