docs(common): update API docs for unified location service for upgrading (#30567)
PR Close #30567
This commit is contained in:
@ -12,21 +12,80 @@
|
||||
* @publicApi
|
||||
**/
|
||||
export abstract class UrlCodec {
|
||||
/**
|
||||
* Encodes the path from the provided string
|
||||
*
|
||||
* @param path The path string
|
||||
*/
|
||||
abstract encodePath(path: string): string;
|
||||
|
||||
/**
|
||||
* Decodes the path from the provided string
|
||||
*
|
||||
* @param path The path string
|
||||
*/
|
||||
abstract decodePath(path: string): string;
|
||||
|
||||
/**
|
||||
* Encodes the search string from the provided string or object
|
||||
*
|
||||
* @param path The path string or object
|
||||
*/
|
||||
abstract encodeSearch(search: string|{[k: string]: unknown}): string;
|
||||
|
||||
/**
|
||||
* Decodes the search objects from the provided string
|
||||
*
|
||||
* @param path The path string
|
||||
*/
|
||||
abstract decodeSearch(search: string): {[k: string]: unknown};
|
||||
|
||||
/**
|
||||
* Encodes the hash from the provided string
|
||||
*
|
||||
* @param path The hash string
|
||||
*/
|
||||
abstract encodeHash(hash: string): string;
|
||||
|
||||
/**
|
||||
* Decodes the hash from the provided string
|
||||
*
|
||||
* @param path The hash string
|
||||
*/
|
||||
abstract decodeHash(hash: string): string;
|
||||
|
||||
/**
|
||||
* Normalizes the URL from the provided string
|
||||
*
|
||||
* @param path The URL string
|
||||
*/
|
||||
abstract normalize(href: string): string;
|
||||
|
||||
|
||||
/**
|
||||
* Normalizes the URL from the provided string, search, hash, and base URL parameters
|
||||
*
|
||||
* @param path The URL path
|
||||
* @param search The search object
|
||||
* @param hash The has string
|
||||
* @param baseUrl The base URL for the URL
|
||||
*/
|
||||
abstract normalize(path: string, search: {[k: string]: unknown}, hash: string, baseUrl?: string):
|
||||
string;
|
||||
|
||||
/**
|
||||
* Checks whether the two strings are equal
|
||||
* @param valA First string for comparison
|
||||
* @param valB Second string for comparison
|
||||
*/
|
||||
abstract areEqual(valA: string, valB: string): boolean;
|
||||
|
||||
/**
|
||||
* Parses the URL string based on the base URL
|
||||
*
|
||||
* @param url The full URL string
|
||||
* @param base The base for the URL
|
||||
*/
|
||||
abstract parse(url: string, base?: string): {
|
||||
href: string,
|
||||
protocol: string,
|
||||
@ -40,8 +99,8 @@ export abstract class UrlCodec {
|
||||
}
|
||||
|
||||
/**
|
||||
* A `AngularJSUrlCodec` that uses logic from AngularJS to serialize and parse URLs
|
||||
* and URL parameters
|
||||
* A `UrlCodec` that uses logic from AngularJS to serialize and parse URLs
|
||||
* and URL parameters.
|
||||
*
|
||||
* @publicApi
|
||||
*/
|
||||
|
Reference in New Issue
Block a user