{"action":"created","issue":{"url":"https://api.github.com/repos/electron/electron/issues/10090","repository_url":"https://api.github.com/repos/electron/electron","labels_url":"https://api.github.com/repos/electron/electron/issues/10090/labels{/name}","comments_url":"https://api.github.com/repos/electron/electron/issues/10090/comments","events_url":"https://api.github.com/repos/electron/electron/issues/10090/events","html_url":"https://github.com/electron/electron/pull/10090","id":244876990,"number":10090,"title":"Fix differences between text and structured parts","user":{"login":"3n-mb","id":13634613,"avatar_url":"https://avatars1.githubusercontent.com/u/13634613?v=4","gravatar_id":"","url":"https://api.github.com/users/3n-mb","html_url":"https://github.com/3n-mb","followers_url":"https://api.github.com/users/3n-mb/followers","following_url":"https://api.github.com/users/3n-mb/following{/other_user}","gists_url":"https://api.github.com/users/3n-mb/gists{/gist_id}","starred_url":"https://api.github.com/users/3n-mb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/3n-mb/subscriptions","organizations_url":"https://api.github.com/users/3n-mb/orgs","repos_url":"https://api.github.com/users/3n-mb/repos","events_url":"https://api.github.com/users/3n-mb/events{/privacy}","received_events_url":"https://api.github.com/users/3n-mb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"zeke","id":2289,"avatar_url":"https://avatars1.githubusercontent.com/u/2289?v=4","gravatar_id":"","url":"https://api.github.com/users/zeke","html_url":"https://github.com/zeke","followers_url":"https://api.github.com/users/zeke/followers","following_url":"https://api.github.com/users/zeke/following{/other_user}","gists_url":"https://api.github.com/users/zeke/gists{/gist_id}","starred_url":"https://api.github.com/users/zeke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeke/subscriptions","organizations_url":"https://api.github.com/users/zeke/orgs","repos_url":"https://api.github.com/users/zeke/repos","events_url":"https://api.github.com/users/zeke/events{/privacy}","received_events_url":"https://api.github.com/users/zeke/received_events","type":"User","site_admin":true},"assignees":[{"login":"zeke","id":2289,"avatar_url":"https://avatars1.githubusercontent.com/u/2289?v=4","gravatar_id":"","url":"https://api.github.com/users/zeke","html_url":"https://github.com/zeke","followers_url":"https://api.github.com/users/zeke/followers","following_url":"https://api.github.com/users/zeke/following{/other_user}","gists_url":"https://api.github.com/users/zeke/gists{/gist_id}","starred_url":"https://api.github.com/users/zeke/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zeke/subscriptions","organizations_url":"https://api.github.com/users/zeke/orgs","repos_url":"https://api.github.com/users/zeke/repos","events_url":"https://api.github.com/users/zeke/events{/privacy}","received_events_url":"https://api.github.com/users/zeke/received_events","type":"User","site_admin":true}],"milestone":null,"comments":0,"created_at":"2017-07-22T23:05:41Z","updated_at":"2017-11-27T05:52:50Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/electron/electron/pulls/10090","html_url":"https://github.com/electron/electron/pull/10090","diff_url":"https://github.com/electron/electron/pull/10090.diff","patch_url":"https://github.com/electron/electron/pull/10090.patch"},"body":"#### Issue 1:\r\nLines 2929-2945, definition of `registerFileProtocol(...)`.\r\nDoc lines say (as well as docs on site),\r\n```\r\n     *  .... To handle\r\n     * the request, the callback should be called with either the file's path or an\r\n     * object that has a path property, e.g. callback(filePath) or callback({path:\r\n     * filePath}). When callback is called with nothing, a number, or an object that\r\n     * has an error property, the request will fail with the error number you\r\n     * specified. \r\n```\r\nbut definition itself is\r\n```\r\n    registerFileProtocol(scheme: string, handler: (request: RegisterFileProtocolRequest, callback: (filePath?: string) => void) => void, completion?: (error: Error) => void): void;\r\n```\r\n`callback`'s function definition has arguments `filePath?: string`, but it should also take in values that will make request fail, i.e. `filePath?: string | number | ...`\r\n\r\n#### Issue 2:\r\nLines 2922-2928, definition for `registerBufferProtocol(...)`.\r\nDoc lines say (as well as docs on site),\r\n```\r\n     *  ....  The usage\r\n     * is the same with registerFileProtocol, except that the callback should be called\r\n     * with either a Buffer object or an object that has the data, mimeType, and\r\n     * charset properties. Example:\r\n     */\r\n```\r\nbut definition itself is\r\n```\r\n    registerBufferProtocol(scheme: string, handler: (request: RegisterBufferProtocolRequest, callback: (buffer?: Buffer | MimeTypedBuffer) => void) => void, completion?: (error: Error) => void): void;\r\n```\r\nmisses types for `buffer` argument in `callback`, that will make request to fail. It should be at least `buffer?: Buffer | MimeTypedBuffer | number`, which I know runs properly.\r\n\r\nBy the way, it seems that an *Example:* part of the doc line is chopped off.\r\n\r\n#### Issue 3:\r\nLines 2917-2921, definition for `isProtocolHandled(...)`.\r\nDoc lines say,\r\n```\r\n    /**\r\n     * The callback will be called with a boolean that indicates whether there is\r\n     * already a handler for scheme.\r\n     */\r\n```\r\nbut definition itself is\r\n```\r\nisProtocolHandled(scheme: string, callback: (error: Error) => void): void;\r\n```\r\nwhere callback argument should be `callback: (isHandled: boolean) => void`."},"comment":{"url":"https://api.github.com/repos/electron/electron/issues/comments/347085593","html_url":"https://github.com/electron/electron/pull/10090#issuecomment-347085593","issue_url":"https://api.github.com/repos/electron/electron/issues/10090","id":347085593,"user":{"login":"zcbenz","id":639601,"avatar_url":"https://avatars0.githubusercontent.com/u/639601?v=4","gravatar_id":"","url":"https://api.github.com/users/zcbenz","html_url":"https://github.com/zcbenz","followers_url":"https://api.github.com/users/zcbenz/followers","following_url":"https://api.github.com/users/zcbenz/following{/other_user}","gists_url":"https://api.github.com/users/zcbenz/gists{/gist_id}","starred_url":"https://api.github.com/users/zcbenz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zcbenz/subscriptions","organizations_url":"https://api.github.com/users/zcbenz/orgs","repos_url":"https://api.github.com/users/zcbenz/repos","events_url":"https://api.github.com/users/zcbenz/events{/privacy}","received_events_url":"https://api.github.com/users/zcbenz/received_events","type":"User","site_admin":true},"created_at":"2017-11-27T05:52:50Z","updated_at":"2017-11-27T05:52:50Z","author_association":"CONTRIBUTOR","body":"@zeke Is this PR still blocked?"}}
{"actor":{"display_login":"zcbenz"}}