{"action":"created","issue":{"url":"https://api.github.com/repos/jefflau/jest-fetch-mock/issues/70","repository_url":"https://api.github.com/repos/jefflau/jest-fetch-mock","labels_url":"https://api.github.com/repos/jefflau/jest-fetch-mock/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/jefflau/jest-fetch-mock/issues/70/comments","events_url":"https://api.github.com/repos/jefflau/jest-fetch-mock/issues/70/events","html_url":"https://github.com/jefflau/jest-fetch-mock/issues/70","id":327117026,"node_id":"MDU6SXNzdWUzMjcxMTcwMjY=","number":70,"title":"Typescript types do not include returned values, important object attributes","user":{"login":"EButlerIV","id":591805,"node_id":"MDQ6VXNlcjU5MTgwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/591805?v=4","gravatar_id":"","url":"https://api.github.com/users/EButlerIV","html_url":"https://github.com/EButlerIV","followers_url":"https://api.github.com/users/EButlerIV/followers","following_url":"https://api.github.com/users/EButlerIV/following{/other_user}","gists_url":"https://api.github.com/users/EButlerIV/gists{/gist_id}","starred_url":"https://api.github.com/users/EButlerIV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EButlerIV/subscriptions","organizations_url":"https://api.github.com/users/EButlerIV/orgs","repos_url":"https://api.github.com/users/EButlerIV/repos","events_url":"https://api.github.com/users/EButlerIV/events{/privacy}","received_events_url":"https://api.github.com/users/EButlerIV/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-05-28T21:03:49Z","updated_at":"2018-06-04T23:43:39Z","closed_at":null,"author_association":"NONE","body":"## mockResponse, mockResponseOnce, etc. do not return void\r\nAccording to index.d.ts, mockResponse, etc all return void.\r\n``` \r\nmockResponse(body: string, init?: MockParams): void;\r\nmockResponseOnce(body: string, init?: MockParams): void;\r\nmockResponses(responses: Array<{body: string, init?: MockParams}>): void;\r\n```\r\nIn actuality, they all return the mocked fetch fn., so we can chain mockResponse calls.\r\n\r\n## fetch.mock isn't included in the definition\r\nSince mock isn't included in the definition and the fetch definition doesn't extend jest's mocked function definition, uses of `.mock.calls` fail type checking."},"comment":{"url":"https://api.github.com/repos/jefflau/jest-fetch-mock/issues/comments/394534667","html_url":"https://github.com/jefflau/jest-fetch-mock/issues/70#issuecomment-394534667","issue_url":"https://api.github.com/repos/jefflau/jest-fetch-mock/issues/70","id":394534667,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NDUzNDY2Nw==","user":{"login":"ravenscar","id":6245538,"node_id":"MDQ6VXNlcjYyNDU1Mzg=","avatar_url":"https://avatars1.githubusercontent.com/u/6245538?v=4","gravatar_id":"","url":"https://api.github.com/users/ravenscar","html_url":"https://github.com/ravenscar","followers_url":"https://api.github.com/users/ravenscar/followers","following_url":"https://api.github.com/users/ravenscar/following{/other_user}","gists_url":"https://api.github.com/users/ravenscar/gists{/gist_id}","starred_url":"https://api.github.com/users/ravenscar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ravenscar/subscriptions","organizations_url":"https://api.github.com/users/ravenscar/orgs","repos_url":"https://api.github.com/users/ravenscar/repos","events_url":"https://api.github.com/users/ravenscar/events{/privacy}","received_events_url":"https://api.github.com/users/ravenscar/received_events","type":"User","site_admin":false},"created_at":"2018-06-04T23:43:39Z","updated_at":"2018-06-04T23:43:39Z","author_association":"NONE","body":"@EButlerIV looking at the docs for `mockResponses` I think the type signature is wrong. This isn't something you introduced I think it has always been wrong, I think it should be:\r\n```\r\nmockResponses(...responses : Array<[string] | [string, MockParams]>) : Fetch;\r\n```\r\nnot\r\n```\r\nmockResponses(responses: Array<{body: string, init?: MockParams}>): Fetch;\r\n```\r\n\r\nWhat do you think?"}}
{"actor":{"display_login":"ravenscar"}}