Microsoft/TypeScript

URL interface is not part of the Window object

Offen

#44.245 geöffnet am 25.05.2021

 (7 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)TypeScript (13.395 Forks)batch import
BugDomain: lib.d.tsHelp Wanted

Repository-Metriken

Stars
 (108.860 Sterne)
PR-Merge-Metriken
 (Durchschn. Merge 6T 17h) (9 gemergte PRs in 30 T)

Beschreibung

Bug Report

As the title says, the URL interface (#3753) should be part of the Window object: window.URL. Please look at https://developer.mozilla.org/fr/docs/Web/API/URL .

🔎 Search Terms

window url, url, new url, createObjectURL, revokeObjectURL

🕗 Version & Regression Information

I'm using TypeScript 4.2.4.

🙁 Actual behavior

window.URL is not defined.

🙂 Expected behavior

window.URL should refer to the URL interface you added on the issue #3753:

URL: {
    prototype: URL;
    new(url: string, base?: string | URL): URL;
    createObjectURL(object: any): string;
    revokeObjectURL(url: string): void;
};

Contributor Guide