Skip to content

Fetch API Missing Redirected Property #17758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arjunyel opened this issue Aug 12, 2017 · 1 comment
Closed

Fetch API Missing Redirected Property #17758

arjunyel opened this issue Aug 12, 2017 · 1 comment
Assignees
Labels
Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue

Comments

@arjunyel
Copy link

TypeScript Version: 2.4.2

Code

fetch('flowers.jpg').then(function(response) {
  if(response.redirected) {
//  Property 'redirected' does not exist on type 'Response'.
    return response.blob();
  }
  throw new Error('Request was not redirected!.');
});

Expected behavior:

The response from a fetch API request has a redirected property per MDN

Actual behavior:

The definition does not exist

@kitsonk
Copy link
Contributor

kitsonk commented Aug 12, 2017

Just to note it was only recently added to the living standard. It is not present in Edge.

@mhegazy mhegazy added the Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet label Aug 15, 2017
@mhegazy mhegazy self-assigned this Aug 15, 2017
@mhegazy mhegazy added this to the TypeScript 2.6 milestone Aug 15, 2017
@mhegazy mhegazy reopened this Aug 15, 2017
@mhegazy mhegazy added the Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript label Aug 15, 2017
@mhegazy mhegazy added Fixed A PR has been merged for this issue and removed Fixed A PR has been merged for this issue Fixed in TSJS repo Fix merged in https://github.com/Microsoft/TSJS-lib-generator, but not ported yet labels Aug 24, 2017
@microsoft microsoft locked and limited conversation to collaborators Jun 14, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Domain: lib.d.ts The issue relates to the different libraries shipped with TypeScript Fixed A PR has been merged for this issue
Projects
None yet
Development

No branches or pull requests

3 participants