{"action":"created","issue":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/31268","repository_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped","labels_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/31268/labels{/name}","comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/31268/comments","events_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/31268/events","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/31268","id":389863350,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM3NzU3NDgw","number":31268,"title":"[dockerode] Use classes instead of interfaces where possible + fix #19437","user":{"login":"P4sca1","id":10992664,"node_id":"MDQ6VXNlcjEwOTkyNjY0","avatar_url":"https://avatars0.githubusercontent.com/u/10992664?v=4","gravatar_id":"","url":"https://api.github.com/users/P4sca1","html_url":"https://github.com/P4sca1","followers_url":"https://api.github.com/users/P4sca1/followers","following_url":"https://api.github.com/users/P4sca1/following{/other_user}","gists_url":"https://api.github.com/users/P4sca1/gists{/gist_id}","starred_url":"https://api.github.com/users/P4sca1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/P4sca1/subscriptions","organizations_url":"https://api.github.com/users/P4sca1/orgs","repos_url":"https://api.github.com/users/P4sca1/repos","events_url":"https://api.github.com/users/P4sca1/events{/privacy}","received_events_url":"https://api.github.com/users/P4sca1/received_events","type":"User","site_admin":false},"labels":[{"id":644095236,"node_id":"MDU6TGFiZWw2NDQwOTUyMzY=","url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/labels/Merge:Express","name":"Merge:Express","color":"00AA00","default":false},{"id":905334095,"node_id":"MDU6TGFiZWw5MDUzMzQwOTU=","url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/labels/Owner%20Approved","name":"Owner Approved","color":"0e8a16","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-12-11T17:05:15Z","updated_at":"2018-12-13T01:11:45Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/31268","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/31268","diff_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/31268.diff","patch_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/31268.patch"},"body":"Please fill in this template.\r\n\r\n- [x] Use a meaningful title for the pull request. Include the name of the package modified.\r\n- [x] Test the change in your own code. (Compile and run.)\r\n- [x] Add or edit tests to reflect the change. (Run with `npm test`.)\r\n- [x] Follow the advice from the [readme](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#make-a-pull-request).\r\n- [x] Avoid [common mistakes](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/README.md#common-mistakes).\r\n- [x] Run `npm run lint package-name` (or `tsc` if no `tslint.json` is present).\r\n\r\nIf changing an existing definition:\r\n- [ ] Provide a URL to documentation or source code which provides context for the suggested changes\r\n- [ ] Increase the version number in the header if appropriate.\r\n- [ ] If you are making substantial changes, consider adding a `tslint.json` containing `{ \"extends\": \"dtslint/dt.json\" }`.\r\n\r\n`Container`, `Volume`, `Service` and more where defined as `interface`s, but they are created and used as `class`es in the dockerode source code. (See https://github.com/apocas/dockerode/blob/master/lib/docker.js#L314-L316)\r\nDefining them as `class`es makes things like `class MyContainer extends Dockerode.Container` possible.\r\n\r\nThis PR also marks optional `id` / `name` field as non-optional because they are always present.\r\n\r\nAlso, the return type of the `container.attach()` method is changed to `NodeJS.ReadWriteStream`, which fixes https://github.com/DefinitelyTyped/DefinitelyTyped/issues/19437.\r\nHere is an example where the returned `stream` is used as a `WriteStream`: https://github.com/apocas/dockerode/blob/543e49f53c48925c27d75b174a345dc133dff0b4/test/container.js#L238-L264\r\n"},"comment":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/comments/446805287","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/31268#issuecomment-446805287","issue_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/31268","id":446805287,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NjgwNTI4Nw==","user":{"login":"jessetrinity","id":42591254,"node_id":"MDQ6VXNlcjQyNTkxMjU0","avatar_url":"https://avatars1.githubusercontent.com/u/42591254?v=4","gravatar_id":"","url":"https://api.github.com/users/jessetrinity","html_url":"https://github.com/jessetrinity","followers_url":"https://api.github.com/users/jessetrinity/followers","following_url":"https://api.github.com/users/jessetrinity/following{/other_user}","gists_url":"https://api.github.com/users/jessetrinity/gists{/gist_id}","starred_url":"https://api.github.com/users/jessetrinity/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jessetrinity/subscriptions","organizations_url":"https://api.github.com/users/jessetrinity/orgs","repos_url":"https://api.github.com/users/jessetrinity/repos","events_url":"https://api.github.com/users/jessetrinity/events{/privacy}","received_events_url":"https://api.github.com/users/jessetrinity/received_events","type":"User","site_admin":false},"created_at":"2018-12-13T01:11:45Z","updated_at":"2018-12-13T01:11:45Z","author_association":"CONTRIBUTOR","body":"Cherry picking is for iconoclasts."}}
{"actor":{"display_login":"jessetrinity"}}