Skip to content

Interface: PatternParam

API / @xmachines/play-pattern / PatternParam

Defined in: play-pattern/src/pattern-grammar.ts:101

One named param of a pattern, with the question that every caller asks about it.

Properties

PropertyModifierTypeDescriptionDefined in
groupNamereadonlystringThe name that URLPattern compiles, for example cat_id.play-pattern/src/pattern-grammar.ts:105
namereadonlystringThe name as the pattern declares it, for example cat-id.play-pattern/src/pattern-grammar.ts:103
optionalreadonlybooleanTrue when a matching path can carry no value for this param. The modifier ? and the modifier * make a param optional, and so does EVERY group above it that carries one of the two. The modifier + does not: it repeats a param that one value must still fill.play-pattern/src/pattern-grammar.ts:113