@micro-router
    Preparing search index...
    • Matches a single path segment against a set of allowed string literals. Returns params as { [key]: value } if matched.

      Example: const color = textEnum({ key: "color", options: ["red", "blue", "green"] }); color.match("/red") // { success: true, params: { color: "red" }, ... }

      Type Parameters

      • const K extends string
      • const T extends readonly string[]

      Parameters

      • args: { key: K; options: T }

      Returns Segment<
          Path<
              `:${K}${WrapTypeIndicator<`(${JoinStringTypes<[...T[]], "|">})`>}`,
              { [key in string]: [...T[]][number] },
          >,
      >