{"action":"created","issue":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/10908","repository_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped","labels_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/10908/labels{/name}","comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/10908/comments","events_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/10908/events","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/10908","id":173999668,"number":10908,"title":"Node.d.ts: Update definitions for NodeBuffer interface","user":{"login":"hriss95","id":17428714,"avatar_url":"https://avatars.githubusercontent.com/u/17428714?v=3","gravatar_id":"","url":"https://api.github.com/users/hriss95","html_url":"https://github.com/hriss95","followers_url":"https://api.github.com/users/hriss95/followers","following_url":"https://api.github.com/users/hriss95/following{/other_user}","gists_url":"https://api.github.com/users/hriss95/gists{/gist_id}","starred_url":"https://api.github.com/users/hriss95/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hriss95/subscriptions","organizations_url":"https://api.github.com/users/hriss95/orgs","repos_url":"https://api.github.com/users/hriss95/repos","events_url":"https://api.github.com/users/hriss95/events{/privacy}","received_events_url":"https://api.github.com/users/hriss95/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/labels/Needs%20more%20info","name":"Needs more info","color":"fbca04"}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-08-30T11:55:43Z","updated_at":"2016-08-31T16:52:18Z","closed_at":"2016-08-31T16:25:51Z","pull_request":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/10908","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/10908","diff_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/10908.diff","patch_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/10908.patch"},"body":"case 2. Improvement to existing type definition.\r\n\r\n- Added the following definitions to node.d.ts' NodeBuffer interface:\r\n```\r\nBuffer.prototype.utf8Slice;\r\n\r\nBuffer.prototype.binarySlice;\r\n\r\nBuffer.prototype.asciiSlice;\r\n\r\nBuffer.prototype.utf8Write;\r\n\r\nBuffer.prototype.binaryWrite;\r\n\r\nBuffer.prototype.asciiWrite;\r\n```\r\nThe first commit in this pull request was causing compile errors due to 2 other properties I tried to add. These were get and set (see issue [10906](https://github.com/DefinitelyTyped/DefinitelyTyped/issues/10906) ). The compile error I was given was incorrectly extending Uint8Array and I assumed at first that it was because of get/set being defined in Uint8Array, but I couldn't find anything. Then I saw the full compiler message which was awfully strange as it was regarding another property of the NodeBuffer interface:\r\n\r\n> error TS2430: Interface 'NodeBuffer' incorrectly extends interface 'Uint8Array'.\r\n  Types of property 'fill' are incompatible.\r\n    Type '(value: any, offset?: number, end?: number) => this' is not assignable to type '(value: number, start?: number, end?: number) => Uint8Array'.\r\n      Type 'this' is not assignable to type 'Uint8Array'.\r\n        Type 'NodeBuffer' is not assignable to type 'Uint8Array'.\r\n          Types of property 'set' are incompatible.\r\n            Type '(offset: number) => any' is not assignable to type '{ (index: number, value: number): void; (array: ArrayLike<number>, offset?: number): void; }'.\r\n              Types of parameters 'offset' and 'array' are incompatible.\r\n                Type 'ArrayLike<number>' is not assignable to type 'number'.\r\n\r\nI removed the get and set properties and left the ones that do not break anything but just improve the definitions for the interface. \r\n"},"comment":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/comments/243828027","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/10908#issuecomment-243828027","issue_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/10908","id":243828027,"user":{"login":"RyanCavanaugh","id":6685088,"avatar_url":"https://avatars.githubusercontent.com/u/6685088?v=3","gravatar_id":"","url":"https://api.github.com/users/RyanCavanaugh","html_url":"https://github.com/RyanCavanaugh","followers_url":"https://api.github.com/users/RyanCavanaugh/followers","following_url":"https://api.github.com/users/RyanCavanaugh/following{/other_user}","gists_url":"https://api.github.com/users/RyanCavanaugh/gists{/gist_id}","starred_url":"https://api.github.com/users/RyanCavanaugh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RyanCavanaugh/subscriptions","organizations_url":"https://api.github.com/users/RyanCavanaugh/orgs","repos_url":"https://api.github.com/users/RyanCavanaugh/repos","events_url":"https://api.github.com/users/RyanCavanaugh/events{/privacy}","received_events_url":"https://api.github.com/users/RyanCavanaugh/received_events","type":"User","site_admin":false},"created_at":"2016-08-31T16:52:17Z","updated_at":"2016-08-31T16:52:17Z","body":"Not sure I understand the relationship between this PR and those. #10397 was closed because it was just a redeclaration of an existing property, and #10394 added an explicitly-documented property."}}
{"actor":{"display_login":"RyanCavanaugh"}}