Module

x/hono/types.ts>MergePath

Web Framework built on Web Standards
Extremely Popular
Go to Latest
type alias MergePath
import { type MergePath } from "https://dotland.deno.dev/x/hono@v4.2.8/types.ts";

Type Parameters

A extends string
B extends string
definition: B extends "" ? MergePath<A, "/"> : A extends "" ? B : A extends "/" ? B : A extends `${infer P}/` ? B extends `/${infer Q}` ? `${P}/${Q}` : `${P}/${B}` : B extends `/${infer Q}` ? Q extends "" ? A : `${A}/${Q}` : `${A}/${B}`