Skip to content
Typecustom-idv0.2.7

DecodedRoute

The outcome of decoding a wire against several customIds, the matched prefix paired with its values.

type DecodedRoute<Defs extends readonly AnyCustomId[]> = {
    [Index in keyof Defs]: Defs[Index] extends AnyCustomId
        ? {
              readonly prefix: Defs[Index]["prefix"];
              readonly params: DecodedParams<Defs[Index]["shape"]>;
          }
        : never;
}[number];