rest-vir - v1.0.0
    Preparing search index...

    Function matchUrlToService

    • Given a raw path or URL, finds an endpoint or WebSocket path that will match in the given service. If no match is found, this returns undefined.

      Type Parameters

      • const Service extends Readonly<
            {
                endpoints: Record<EndpointPathBase, any>;
                webSockets: Record<EndpointPathBase, any>;
            },
        >

      Parameters

      • this: void
      • service: Service
      • url: string

        The URL or path to match against.

      Returns
          | undefined
          | _RequireAtLeastOne<
              {
                  endpointPath: keyof Service["endpoints"];
                  webSocketPath: keyof Service["webSockets"];
              },
              "webSocketPath"
              | "endpointPath",
          >