Files
SnowLuma/.pnpm-store/v11/files/e5/aa7d613e2e7bde38f0832637bb1b9aa646f62ccad58a31a9acd0102e75c9abcd0e074134cc41b2c7454112e2e576de1b79253bce9c95b503c7d8b71a8d15f5
TanTan 2a69b23b47
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:27:07 +08:00

31 lines
1.1 KiB
Plaintext

import { LocationRewrite } from './router.cjs';
/** Compose multiple rewrite pairs into a single in/out rewrite. */
/** Compose multiple rewrite pairs into a single in/out rewrite. */
export declare function composeRewrites(rewrites: Array<LocationRewrite>): {
input: ({ url }: {
url: URL;
}) => URL;
output: ({ url }: {
url: URL;
}) => URL;
};
/** Create a rewrite pair that strips/adds a basepath on input/output. */
/** Create a rewrite pair that strips/adds a basepath on input/output. */
export declare function rewriteBasepath(opts: {
basepath: string;
caseSensitive?: boolean;
}): {
input: ({ url }: {
url: URL;
}) => URL;
output: ({ url }: {
url: URL;
}) => URL;
};
/** Execute a location input rewrite if provided. */
/** Execute a location input rewrite if provided. */
export declare function executeRewriteInput(rewrite: LocationRewrite | undefined, url: URL): URL;
/** Execute a location output rewrite if provided. */
/** Execute a location output rewrite if provided. */
export declare function executeRewriteOutput(rewrite: LocationRewrite | undefined, url: URL): URL;