Skip to content

Commit

Permalink
Patch invlid return types in api definition
Browse files Browse the repository at this point in the history
  • Loading branch information
tong committed Jun 15, 2023
1 parent b12599c commit 3f70ec2
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions electron-api.json
Original file line number Diff line number Diff line change
Expand Up @@ -8620,10 +8620,7 @@
"returns": null
}
],
"returns": {
"collection": false,
"type": "this"
},
"returns": null,
"additionalTags": [],
"urlFragment": "#requestendchunk-encoding-callback"
},
Expand Down Expand Up @@ -15845,7 +15842,7 @@
"description": "",
"required": false,
"collection": false,
"type": "RequestInit & { bypassCustomProtocolHandlers?: boolean }"
"type": "RequestInit"
}
],
"returns": {
Expand Down Expand Up @@ -42204,4 +42201,4 @@
}
]
}
]
]
2 changes: 1 addition & 1 deletion src/electron/main/ClientRequest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, js.node.Buffer>, ?encoding:String, ?callback:haxe.Constraints.Function):ClientRequest;
function end(?chunk:haxe.extern.EitherType<String, js.node.Buffer>, ?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.
**/
Expand Down
2 changes: 1 addition & 1 deletion src/electron/remote/ClientRequest.hx
Original file line number Diff line number Diff line change
Expand Up @@ -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<String, js.node.Buffer>, ?encoding:String, ?callback:haxe.Constraints.Function):ClientRequest;
function end(?chunk:haxe.extern.EitherType<String, js.node.Buffer>, ?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.
**/
Expand Down

0 comments on commit 3f70ec2

Please sign in to comment.