Interface StringConstructor
interface StringConstructor {
new StringConstructornew (value?: any): String;
prototype: String;
fromCharCode(...codes: number[]): string;
fromCodePoint(...codePoints: number[]): string;
raw(template: {
raw: readonly string[] | ArrayLike<string>;
}, ...substitutions: any[]): string;
(value?: any): string;
}
new StringConstructornew (value?: any): String;
prototype: String;
fromCharCode(...codes: number[]): string;
fromCodePoint(...codePoints: number[]): string;
raw(template: {
raw: readonly string[] | ArrayLike<string>;
}, ...substitutions: any[]): string;
(value?: any): string;
}
Index
Methods
fromCharCode
fromCodePoint
raw
- raw(template, ...substitutions): string
String.raw is usually used as a tag function of a Tagged Template String. When called as such, the first argument will be a well formed template call site object and the rest parameter will contain the substitution values. It can also be called directly, for example, to interleave strings and values from your own tag function, and in this case the only thing it needs from the first argument is the raw property.
Parameters
Returns string
Return the String value whose elements are, in order, the elements in the List elements. If length is 0, the empty string is returned.