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

# Interface: ParamType

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

The pieces of a ui-router ParamType that path matching and url formatting
exercise, with core's member signatures. Relaxation vs core: a plain
object suffices (core wants its ParamType class), `pattern` is required,
and `name` is carried here (the class holds it upstream). `encode` and
`equals`, when omitted, fall back to core's ParamType class defaults
(identity encode, loose equality).

## Extends

* `Readonly`<`Pick`<`ParamTypeDefinition`, `"is"` | `"decode"` | `"raw"`>>
* `Readonly`<`Required`<`Pick`<`ParamTypeDefinition`, `"pattern"`>>>

## Properties

| Property | Modifier | Type | Description | Defined in |
| ------ | ------ | ------ | ------ | ------ |
|  `encode?` | `readonly` | (`val`) => `string` | `string`\[] | `null` | `undefined` | Relaxation vs core: may return null/undefined, which format() renders as an absent value (core's built-ins do the same at runtime). | [url-matcher.ts:52](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/url-matcher.ts#L52) |
|  `equals?` | `readonly` | (`a`, `b`) => `boolean` | Relaxation vs core: optional here (core's class always carries one). | [url-matcher.ts:54](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/url-matcher.ts#L54) |
|  `name` | `readonly` | `string` | The type's name — a built-in (`int`, `bool`, …) or a custom one. | [url-matcher.ts:50](https://github.com/simshanith/lit-ui-router/blob/740888c2b2ba358c4dfa52a122e927df6a604b12/packages/ui-router-server/src/url-matcher.ts#L50) |
