{"action":"created","issue":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/10758","repository_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped","labels_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/10758/labels{/name}","comments_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/10758/comments","events_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/10758/events","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/10758","id":172396751,"number":10758,"title":"Improve type definition for isomorphic-fetch","user":{"login":"zengfenfei","id":773310,"avatar_url":"https://avatars.githubusercontent.com/u/773310?v=3","gravatar_id":"","url":"https://api.github.com/users/zengfenfei","html_url":"https://github.com/zengfenfei","followers_url":"https://api.github.com/users/zengfenfei/followers","following_url":"https://api.github.com/users/zengfenfei/following{/other_user}","gists_url":"https://api.github.com/users/zengfenfei/gists{/gist_id}","starred_url":"https://api.github.com/users/zengfenfei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zengfenfei/subscriptions","organizations_url":"https://api.github.com/users/zengfenfei/orgs","repos_url":"https://api.github.com/users/zengfenfei/repos","events_url":"https://api.github.com/users/zengfenfei/events{/privacy}","received_events_url":"https://api.github.com/users/zengfenfei/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/labels/Awaiting%20reviewer%20feedback","name":"Awaiting reviewer feedback","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-22T08:39:15Z","updated_at":"2016-08-25T20:04:23Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/pulls/10758","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/10758","diff_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/10758.diff","patch_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/10758.patch"},"body":"According to https://fetch.spec.whatwg.org/#requestinit, the `RequestInit` has more options.\r\n\r\nI really like typescript and `isomorphic-fetch` with which I can use `fetch` in both browser and node. But I need to disallow redirection in my project with `redirect` request option which does not exist in current definitions. So I supplement all the allowed options for `RequestInit` according standard."},"comment":{"url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/comments/242518361","html_url":"https://github.com/DefinitelyTyped/DefinitelyTyped/pull/10758#issuecomment-242518361","issue_url":"https://api.github.com/repos/DefinitelyTyped/DefinitelyTyped/issues/10758","id":242518361,"user":{"login":"toddlucas","id":313882,"avatar_url":"https://avatars.githubusercontent.com/u/313882?v=3","gravatar_id":"","url":"https://api.github.com/users/toddlucas","html_url":"https://github.com/toddlucas","followers_url":"https://api.github.com/users/toddlucas/followers","following_url":"https://api.github.com/users/toddlucas/following{/other_user}","gists_url":"https://api.github.com/users/toddlucas/gists{/gist_id}","starred_url":"https://api.github.com/users/toddlucas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/toddlucas/subscriptions","organizations_url":"https://api.github.com/users/toddlucas/orgs","repos_url":"https://api.github.com/users/toddlucas/repos","events_url":"https://api.github.com/users/toddlucas/events{/privacy}","received_events_url":"https://api.github.com/users/toddlucas/received_events","type":"User","site_admin":false},"created_at":"2016-08-25T20:04:23Z","updated_at":"2016-08-25T20:04:23Z","body":"Hi @zengfenfei,\r\nThese properties don't appear to be supported by whatwg-fetch, yet (or node fetch), but since they're in the spec, they'll probably eventually be added. Also, since this is a polyfill, any underlying browser fetch may actually support them. So we should probably add them.\r\n\r\nWould you mind defining `referrerPolicy` and `redirect` string literal types separately as an enum like we do for `mode` (with `RequestMode`)? String literal types were introduced with TypeScript 1.8 and the enum approach works with earlier versions."}}
{"actor":{"display_login":"toddlucas"}}