From 3f70ec21134849af586602f40383ca5dda5300a9 Mon Sep 17 00:00:00 2001 From: tong Date: Thu, 15 Jun 2023 12:53:54 +0200 Subject: [PATCH] Patch invlid return types in api definition --- electron-api.json | 9 +++------ src/electron/main/ClientRequest.hx | 2 +- src/electron/remote/ClientRequest.hx | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/electron-api.json b/electron-api.json index 34d15e14..f00c497d 100644 --- a/electron-api.json +++ b/electron-api.json @@ -8620,10 +8620,7 @@ "returns": null } ], - "returns": { - "collection": false, - "type": "this" - }, + "returns": null, "additionalTags": [], "urlFragment": "#requestendchunk-encoding-callback" }, @@ -15845,7 +15842,7 @@ "description": "", "required": false, "collection": false, - "type": "RequestInit & { bypassCustomProtocolHandlers?: boolean }" + "type": "RequestInit" } ], "returns": { @@ -42204,4 +42201,4 @@ } ] } -] \ No newline at end of file +] diff --git a/src/electron/main/ClientRequest.hx b/src/electron/main/ClientRequest.hx index d2333e0f..91b7c2fd 100644 --- a/src/electron/main/ClientRequest.hx +++ b/src/electron/main/ClientRequest.hx @@ -108,7 +108,7 @@ package electron.main; /** Sends the last chunk of the request data. Subsequent write or end operations will not be allowed. The `finish` event is emitted just after the end operation. **/ - function end(?chunk:haxe.extern.EitherType, ?encoding:String, ?callback:haxe.Constraints.Function):ClientRequest; + function end(?chunk:haxe.extern.EitherType, ?encoding:String, ?callback:haxe.Constraints.Function):Void; /** Cancels an ongoing HTTP transaction. If the request has already emitted the `close` event, the abort operation will have no effect. Otherwise an ongoing event will emit `abort` and `close` events. Additionally, if there is an ongoing response object,it will emit the `aborted` event. **/ diff --git a/src/electron/remote/ClientRequest.hx b/src/electron/remote/ClientRequest.hx index 032c9df4..8c8ed570 100644 --- a/src/electron/remote/ClientRequest.hx +++ b/src/electron/remote/ClientRequest.hx @@ -108,7 +108,7 @@ package electron.remote; /** Sends the last chunk of the request data. Subsequent write or end operations will not be allowed. The `finish` event is emitted just after the end operation. **/ - function end(?chunk:haxe.extern.EitherType, ?encoding:String, ?callback:haxe.Constraints.Function):ClientRequest; + function end(?chunk:haxe.extern.EitherType, ?encoding:String, ?callback:haxe.Constraints.Function):Void; /** Cancels an ongoing HTTP transaction. If the request has already emitted the `close` event, the abort operation will have no effect. Otherwise an ongoing event will emit `abort` and `close` events. Additionally, if there is an ongoing response object,it will emit the `aborted` event. **/