/** * Provides features for storing and retrieving URL query parameters. * * @remarks * The URL can be server-relative, and it can also be an empty or null string. * The query parameters must start with "?" to indicate the first query parameter and * use "&" for all subsequent parameters. The class also supports fragments. * * Edge case behavior: * * Empty value (www.example.com/?test=) stores key and empty value * No equals in queryParam (www.example.com/?test) stores key and undefined value * Empty queryParam (www.example.com/?&debug=on) stores undefined key and value * Query param with only equals (www.example.com/?=&debug=on stores empty string key and value * * @privateRemarks * The design of this class was that it could split the URL out into a data structure, and the user * could add items to the data structure (TBD), and then another (TBD) function would rebuild the URL. * This weird design would ensure that e.g. if no change was made to the data structure, then the * round trip wouldn't change the characters in the URL at all, which might be useful e.g. if we're * comparing URLs. * * @deprecated Use the URLSearchParams browser API instead. The SharePoint Framework includes a * polyfill for older browsers. * @public */ export default class UrlQueryParameterCollection { private _queryParameterList; constructor(url: string); /** * Returns the value of the first matching query parameter or undefined if the key doesn't exist. * * @remarks * Examples: * ``` * this._queryParameterList = [ * {key: TEST, value: done}, * {key: DEBUG, value: false}, * {key: TEST, value: notdone}] * getValue('TEST') ---> 'done' * getValue('debug') ---> 'false' * getValue('lost') ---> undefined * ``` * @param param - the case insensitive key for the desired query parameter value. */ getValue(param: string): string | undefined; /** * Returns the values of all of the matching query parameters or undefined if the key doesn't exist. * * @remarks * Examples: * ``` * this._queryParameterList = [ * {key: TEST, value: done}, * {key: DEBUG, value: false}, * {key: TEST, value: notdone}] * getValues('TEST') ---> ['done', 'notdone'] * getValues('debug') ---> ['false'] * getValues('lost') ---> undefined * ``` * @param param - the case insensitive key for the desired query parameter value. */ getValues(param: string): (string | undefined)[] | undefined; private _getUrlQueryParameterArray; } //# sourceMappingURL=UrlQueryParameterCollection.d.ts.map