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

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 |
|  `equals?` | `readonly` | (`a`, `b`) => `boolean` | Relaxation vs core: optional here (core's class always carries one). | url-matcher.ts:54 |
|  `name` | `readonly` | `string` | The type's name — a built-in (`int`, `bool`, …) or a custom one. | url-matcher.ts:50 |
