---
url: >-
  https://lit-ui-router.dev/v1/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

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 |
|  `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 |
|  `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 |
|  `pattern` | `readonly` | `string` | The pattern that was compiled. | url-matcher.ts:475 |
|  `regexp` | `readonly` | `RegExp` | The whole-path regexp the pattern compiled to. | url-matcher.ts:477 |
|  `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 |
|  `segments` | `readonly` | readonly `string`\[] | The raw static segments between path params (length: path params + 1). | url-matcher.ts:479 |
