Interface: ParamPart
API / @xmachines/play-url / index / ParamPart
Defined in: packages/play-pattern/src/pattern-grammar.ts:71
A param: :name, (\d+), or *.
An anonymous param carries no name. URLPattern numbers such a group from 0, and
this library reports it to no machine — see ParsedPattern.params.
Properties
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
groupName | readonly | string | null | The name that URLPattern compiles, with each hyphen rewritten to an underscore, or null for an anonymous param. The rewrite happens ONE time, here, and ParsedPattern.normalized carries the same characters. A caller that needs the group name of a param reads this field, and it rewrites nothing of its own. | packages/play-pattern/src/pattern-grammar.ts:83 |
kind | readonly | "param" | - | packages/play-pattern/src/pattern-grammar.ts:72 |
modifier | readonly | PatternModifier | - | packages/play-pattern/src/pattern-grammar.ts:88 |
name | readonly | string | null | The declared name, with each hyphen kept, or null for an anonymous param. | packages/play-pattern/src/pattern-grammar.ts:74 |
prefix | readonly | string | The / that the param absorbed from the literal before it, or "". | packages/play-pattern/src/pattern-grammar.ts:87 |
regexp | readonly | string | null | The source of the constraint of :id(\d+), or null when the param declares none. | packages/play-pattern/src/pattern-grammar.ts:85 |