# ParseUri

Parses a URI string literal into component literal types, optionally against a base URI.

## Signatures

```ts
export type ParseUri<Input extends string, BaseUri extends string = never> = Pipe<Input, ParseUriLambda, [
    BaseUri
] extends [
    never
] ? Identity : ApplyBaseUriLambda<ParseUri<BaseUri>>> extends infer R ? Uri<GetUriKey<R, "protocol">, GetUriKey<R, "username">, GetUriKey<R, "password">, GetUriKey<R, "hostname">, GetUriKey<R, "port">, GetUriKey<R, "pathname">, GetUriKey<R, "query">, GetUriKey<R, "hash">> : never;
```

## Why

Route type utilities can reason about origin and path components without widening to string.

## Ownership and lifetime

`ParseUri` evaluates the URI parser only for string-literal inputs; its component result is erased from emitted JavaScript.

## Examples

```ts
import type { ParseUri } from "@typed/router/Uri"

type Account = ParseUri<"/account?tab=profile", "https://example.com/">
```
