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;
    }
    • Parameters

      • Optionalvalue: any

      Returns string

    Constructors

    Properties

    Methods

    Constructors

    • Parameters

      • Optionalvalue: any

      Returns String

    Properties

    prototype: String

    Methods

    • Parameters

      • Rest...codes: number[]

      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.

      Parameters

      • Rest...codePoints: number[]

      Returns 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

      • template: {
            raw: readonly string[] | ArrayLike<string>;
        }

        A well-formed template string call site representation.

      • Rest...substitutions: any[]

        A set of substitution values.

      Returns string