openmixer — generated API reference
    Preparing search index...

    Function matchTemplate

    • Match one template against already-split segments, capturing the braced ones.

      The segment COUNT is hard: a template of four segments never matches a path of five. That is why {kind}/{index} had to become two segments rather than one — an id containing a slash could only ever be addressed percent-encoded, and a console whose acceptance test is curl cannot have /channel/main%2F1/mute as an address (2026-07-31-rest-entity-map.md §1).

      An empty capture is refused: /channel//3/mute names no instance, and admitting it would let a malformed address resolve to a real entity with a blank id.

      Parameters

      • template: string
      • segments: readonly string[]

      Returns Readonly<Record<string, string | number>> | undefined