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