/** The type of a single parameter when decoding an URL. */ type ParameterValue = string | undefined; /** The type of a single parameter when encoding an URL. */ type EncodedParameterValue = ParameterValue | number; /** A Parametrizable is an object that supports configuration through URL parameters. */ interface Parametrizable { /** * Lists all parameters handled by this Parametrizable. * It is used to remove existing URL parameters if they * are not listed by the encodeURLParameter() response. */ parameterNames?: string[]; /** * Creates an object, which lists all parameters to append to a URL. * Parameters that have 'undefined' values are removed from a URL. */ encodeURLParameter?(): Record; /** * Called by the ParameterManager to trigger the decoding of parameters. */ decodeURLParameter?(allParameters: Record): void; } /** * The parameter manager is responsible to coordinate the encoding and decoding of URL parameters. * An instance of this class is registered as `"parametermanager.ParameterManager"`. */ interface ParameterManager { /** * Returns a promise resolving an encoded URL with all available parameters. * @param baseURL url to append parameters to. Default value is window.location * @returns url with parameters */ getEncodedURL(baseURL?: string): Promise; } export type { EncodedParameterValue, ParameterManager, ParameterValue, Parametrizable };