AFAICT, URL- typescript "" , WhatWG Url. , .
URL-, , . URL-.
Typescript , ( typescript 2.1.5): node_modules/typescript/lib/lib.es6.d.ts:
interface URL {
hash: string;
host: string;
hostname: string;
href: string;
readonly origin: string;
password: string;
pathname: string;
port: string;
protocol: string;
search: string;
username: string;
toString(): string;
}
declare var URL: {
prototype: URL;
new(url: string, base?: string): URL;
createObjectURL(object: any, options?: ObjectURLOptions): string;
revokeObjectURL(url: string): void;
}
:
a.myurl = new URL("http://www.google.ch");
, WhatWG Url.