{"action":"closed","issue":{"url":"https://api.github.com/repos/SOHU-Co/kafka-node/issues/936","repository_url":"https://api.github.com/repos/SOHU-Co/kafka-node","labels_url":"https://api.github.com/repos/SOHU-Co/kafka-node/issues/936/labels{/name}","comments_url":"https://api.github.com/repos/SOHU-Co/kafka-node/issues/936/comments","events_url":"https://api.github.com/repos/SOHU-Co/kafka-node/issues/936/events","html_url":"https://github.com/SOHU-Co/kafka-node/issues/936","id":315023337,"number":936,"title":"Wrong type definition for `consumer.close()`","user":{"login":"respinha-ribeiro","id":30845991,"avatar_url":"https://avatars3.githubusercontent.com/u/30845991?v=4","gravatar_id":"","url":"https://api.github.com/users/respinha-ribeiro","html_url":"https://github.com/respinha-ribeiro","followers_url":"https://api.github.com/users/respinha-ribeiro/followers","following_url":"https://api.github.com/users/respinha-ribeiro/following{/other_user}","gists_url":"https://api.github.com/users/respinha-ribeiro/gists{/gist_id}","starred_url":"https://api.github.com/users/respinha-ribeiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/respinha-ribeiro/subscriptions","organizations_url":"https://api.github.com/users/respinha-ribeiro/orgs","repos_url":"https://api.github.com/users/respinha-ribeiro/repos","events_url":"https://api.github.com/users/respinha-ribeiro/events{/privacy}","received_events_url":"https://api.github.com/users/respinha-ribeiro/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-04-17T11:45:22Z","updated_at":"2018-05-03T15:28:42Z","closed_at":"2018-05-03T15:28:42Z","author_association":"NONE","body":"I get a typing error if I invoke `consumer.close` with an `error` parameter in the callback within my Typescript code. The `.d.ts` file from [`@types/kafka-node` ](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/kafka-node) only accepts a callback with no arguments, but it is pretty clear on the `Consumer` code that an error can be passed. \r\n\r\nExample:\r\n```js\r\nconsumer.close((err) => { // \"argument is not assignable...\"\r\n    if (err) {\r\n      // .... handle err\r\n    }\r\n    // closed\r\n  });\r\n```"}}
{"actor":{"display_login":"hyperlink"}}