---
url: >-
  https://lit-ui-router.dev/reference/ui-router-server/matcher/interfaces/CompiledMatcher.md
---
[ui-router-server](../../index.md) / [matcher](../index.md) / CompiledMatcher

# Interface: CompiledMatcher\<M>

Defined in: [url-matcher.ts:473](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/url-matcher.ts#L473)

A compiled url pattern: inert data produced by [urlMatcherFactory](../functions/urlMatcherFactory.md)'s
`compile` and consumed by [exec](../functions/exec.md), [format](../functions/format.md), and [compare](../functions/compare.md).
Frozen — treat as immutable: [compare](../functions/compare.md) memoizes per object identity,
and the functions/regexps inside make it not structuredClone-able.
Two data channels: compile's `options.meta` rides compile-time data on
the matcher, and a consumer-owned identity-keyed WeakMap (frozen keys
are fine) covers external or mutable association.

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
|  `M` | `undefined` |

## Properties

| Property | Modifier | Type | Description | Defined in |
| ------ | ------ | ------ | ------ | ------ |
|  `decodeParams` | `readonly` | `boolean` | Whether [exec](../functions/exec.md) percent-decodes captured values (the factory's decodeParams). | [url-matcher.ts:485](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/url-matcher.ts#L485) |
|  `meta` | `readonly` | `M` | Compile-time data riding the matcher (e.g. a build-time route id); the reference is frozen in, the object stays consumer-owned. | [url-matcher.ts:487](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/url-matcher.ts#L487) |
|  `pathParams` | `readonly` | readonly [`CompiledParam`](CompiledParam.md)\[] | The path placeholders, in pattern order — what [exec](../functions/exec.md) reads out of the regexp captures. | [url-matcher.ts:481](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/url-matcher.ts#L481) |
|  `pattern` | `readonly` | `string` | The pattern that was compiled. | [url-matcher.ts:475](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/url-matcher.ts#L475) |
|  `regexp` | `readonly` | `RegExp` | The whole-path regexp the pattern compiled to. | [url-matcher.ts:477](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/url-matcher.ts#L477) |
|  `searchParams` | `readonly` | readonly [`CompiledParam`](CompiledParam.md)\[] | The search placeholders; they never affect path matching, and [exec](../functions/exec.md) resolves them to their defaults. | [url-matcher.ts:483](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/url-matcher.ts#L483) |
|  `segments` | `readonly` | readonly `string`\[] | The raw static segments between path params (length: path params + 1). | [url-matcher.ts:479](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/url-matcher.ts#L479) |
