feat: init
This commit is contained in:
28
node_modules/srvx/dist/_chunks/_url.d.mts
generated
vendored
Normal file
28
node_modules/srvx/dist/_chunks/_url.d.mts
generated
vendored
Normal file
@@ -0,0 +1,28 @@
|
||||
//#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 };
|
||||
Reference in New Issue
Block a user