UNPKG

@wundergraph/cosmo-shared

Version:

Shared code between WunderGraph Cosmo packages

20 lines (19 loc) 799 B
import { SubscriptionProtocol, WebsocketSubprotocol } from '../router-config/builder.js'; export declare function delay(t: number): Promise<unknown>; export declare function splitLabel(label: string): { key: string; value: string; }; export declare function joinLabel({ key, value }: { key: string; value: string; }): string; /** * Normalize the URL by removing the fragments and query parameters. * Only the protocol, hostname, port and path are preserved. * @param url */ export declare function normalizeURL(url: string): string; export declare function isValidUrl(url: string): boolean; export declare function isValidSubscriptionProtocol(protocol: SubscriptionProtocol): boolean; export declare function isValidWebsocketSubprotocol(protocol: WebsocketSubprotocol): boolean;