@qiniu/miku-delivery-mp-ks
Version:
Kuaishou Mini Program SDK for Miku Delivery
50 lines (49 loc) • 1.45 kB
TypeScript
/**
* class URL 实现(小程序环境没有提供内置的 class URL)
* 参考 https://github.com/webcomponents/polyfills/blob/master/packages/url/url.js
*/
/**
* 同 Web 中的 class URL
* 如果命名为 `URL`,小程序开发工具中会报 `SyntaxError: Identifier 'URL' has already been declared`,因此命名为 `Polyfilled_URL`
*/
export declare class Polyfilled_URL {
private _url;
private _scheme;
private _schemeData;
private _username;
private _password;
private _host;
private _port;
private _path;
private _query;
private _fragment;
private _isInvalid;
private _isRelative;
constructor(url: string, base?: Polyfilled_URL | string);
toString(): string;
get href(): string;
set href(href: string);
get protocol(): string;
set protocol(protocol: string);
get username(): string;
set username(username: string);
get password(): string | null;
set password(password: string | null);
get host(): string;
set host(host: string);
get hostname(): string;
set hostname(hostname: string);
get port(): string;
set port(port: string);
get pathname(): string;
set pathname(pathname: string);
get search(): string;
set search(search: string);
get hash(): string;
set hash(hash: string);
get origin(): string;
private invalid;
private IDNAToASCII;
private clear;
private parse;
}