Skip to content

Window props Blob and URL do not exist in v3.6 beta/dev #32750

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
bre1470 opened this issue Aug 7, 2019 · 2 comments
Closed

Window props Blob and URL do not exist in v3.6 beta/dev #32750

bre1470 opened this issue Aug 7, 2019 · 2 comments
Assignees
Labels
Needs Investigation This issue needs a team member to investigate its status. Working as Intended The behavior described is the intended behavior; this is not a bug

Comments

@bre1470
Copy link

bre1470 commented Aug 7, 2019

TypeScript Version: 3.6.0-dev.20190807

Search Terms: window url, window blob, window property, window properties

Code

// A *self-contained* demonstration of the problem follows...
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
declare global {
    const win: Window;
}
if (win.Blob && win.URL) {
    console.log(':)');
}
export {};

Expected behavior:

Compiles without a problem.

Actual behavior:

Errors:

Property 'Blob' does not exist on type 'Window'.
Property 'URL' does not exist on type 'Window'.

Playground Link:

3.6 is not available in playground.

Related Issues:

Nope.

@RyanCavanaugh RyanCavanaugh added the Needs Investigation This issue needs a team member to investigate its status. label Aug 7, 2019
@RyanCavanaugh RyanCavanaugh added this to the TypeScript 3.6.1 milestone Aug 7, 2019
@sandersn
Copy link
Member

sandersn commented Aug 7, 2019

Removed by microsoft/TypeScript-DOM-lib-generator#715. The removal was intentional, but I'll revisit the decision. @saschanaz do you have an opinion on this?

@sandersn
Copy link
Member

sandersn commented Aug 7, 2019

Never mind, I mis-remembered the change. Blob and URL are available globally, and can be referenced on window. However, in 3.6, window: Window & typeof globalThis. You'll need to update your declaration of win for 3.6 to match it.

@sandersn sandersn added the Working as Intended The behavior described is the intended behavior; this is not a bug label Aug 7, 2019
@sandersn sandersn closed this as completed Aug 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Investigation This issue needs a team member to investigate its status. Working as Intended The behavior described is the intended behavior; this is not a bug
Projects
None yet
Development

No branches or pull requests

3 participants