mirror of
https://github.com/dawidd6/action-send-mail.git
synced 2026-09-17 17:09:30 +07:00
74 lines
2.7 KiB
TypeScript
74 lines
2.7 KiB
TypeScript
|
|
/**
|
||
|
|
* Creates an array containing the numeric code points of each Unicode
|
||
|
|
* character in the string. While JavaScript uses UCS-2 internally,
|
||
|
|
* this function will convert a pair of surrogate halves (each of which
|
||
|
|
* UCS-2 exposes as separate characters) into a single code point,
|
||
|
|
* matching UTF-16.
|
||
|
|
* @see `punycode.ucs2.encode`
|
||
|
|
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
||
|
|
* @memberOf punycode.ucs2
|
||
|
|
* @name decode
|
||
|
|
* @param string The Unicode input string (UCS-2).
|
||
|
|
* @returns The new array of code points.
|
||
|
|
*/
|
||
|
|
declare function ucs2decode(string: string): number[];
|
||
|
|
/**
|
||
|
|
* Converts a Punycode string of ASCII-only symbols to a string of Unicode
|
||
|
|
* symbols.
|
||
|
|
* @memberOf punycode
|
||
|
|
* @param input The Punycode string of ASCII-only symbols.
|
||
|
|
* @returns The resulting string of Unicode symbols.
|
||
|
|
*/
|
||
|
|
declare const decode: (input: string) => string;
|
||
|
|
/**
|
||
|
|
* Converts a string of Unicode symbols (e.g. a domain name label) to a
|
||
|
|
* Punycode string of ASCII-only symbols.
|
||
|
|
* @memberOf punycode
|
||
|
|
* @param input The string of Unicode symbols.
|
||
|
|
* @returns The resulting Punycode string of ASCII-only symbols.
|
||
|
|
*/
|
||
|
|
declare const encode: (input: string) => string;
|
||
|
|
/**
|
||
|
|
* Converts a Punycode string representing a domain name or an email address
|
||
|
|
* to Unicode. Only the Punycoded parts of the input will be converted, i.e.
|
||
|
|
* it doesn't matter if you call it on a string that has already been
|
||
|
|
* converted to Unicode.
|
||
|
|
* @memberOf punycode
|
||
|
|
* @param input The Punycoded domain name or email address to
|
||
|
|
* convert to Unicode.
|
||
|
|
* @returns The Unicode representation of the given Punycode
|
||
|
|
* string.
|
||
|
|
*/
|
||
|
|
declare const toUnicode: (input: string) => string;
|
||
|
|
/**
|
||
|
|
* Converts a Unicode string representing a domain name or an email address to
|
||
|
|
* Punycode. Only the non-ASCII parts of the domain name will be converted,
|
||
|
|
* i.e. it doesn't matter if you call it with a domain that's already in
|
||
|
|
* ASCII.
|
||
|
|
* @memberOf punycode
|
||
|
|
* @param input The domain name or email address to convert, as a
|
||
|
|
* Unicode string.
|
||
|
|
* @returns The Punycode representation of the given domain name or
|
||
|
|
* email address.
|
||
|
|
*/
|
||
|
|
declare const toASCII: (input: string) => string;
|
||
|
|
/** Define the public API */
|
||
|
|
/**
|
||
|
|
* A string representing the current Punycode.js version number.
|
||
|
|
* @memberOf punycode
|
||
|
|
* @type String
|
||
|
|
*/
|
||
|
|
export declare const version = "2.3.1";
|
||
|
|
/**
|
||
|
|
* An object of methods to convert from JavaScript's internal character
|
||
|
|
* representation (UCS-2) to Unicode code points, and back.
|
||
|
|
* @see <https://mathiasbynens.be/notes/javascript-encoding>
|
||
|
|
* @memberOf punycode
|
||
|
|
* @type Object
|
||
|
|
*/
|
||
|
|
export declare const ucs2: {
|
||
|
|
decode: typeof ucs2decode;
|
||
|
|
encode: (codePoints: number[]) => string;
|
||
|
|
};
|
||
|
|
export { decode, encode, toASCII, toUnicode };
|