elearning/Frontend-Learner/node_modules/srvx/dist/_chunks/_url.d.mts
2026-01-13 10:48:02 +07:00

28 lines
No EOL
693 B
TypeScript

//#region src/_url.d.ts
type URLInit = {
protocol: string;
host: string;
pathname: string;
search: string;
};
/**
* URL wrapper with fast paths to access to the following props:
*
* - `url.pathname`
* - `url.search`
* - `url.searchParams`
* - `url.protocol`
*
* **NOTES:**
*
* - It is assumed that the input URL is **already encoded** and formatted from an HTTP request and contains no hash.
* - Triggering the setters or getters on other props will deoptimize to full URL parsing.
* - Changes to `searchParams` will be discarded as we don't track them.
*/
declare const FastURL: {
new (url: string | URLInit): URL & {
_url: URL;
};
};
//#endregion
export { FastURL as t };