toArray()
Wrapper.prototype.toArray()
Wrapper.prototype.toArray()
Returns an array
consisting of the opening
chars, text
, and closing
chars.
public toArray(): readonly [Opening, Text, Closing] {
return [this.opening, this.text, this.closing];
}
Return type
readonly [
Opening
,
Text
,
Closing
]
readonly [
Opening
,
Text
,
Closing
]
The return type is a read-only array
of generic type variables in order Opening
, Text
and Closing
.
Returns
The return value is a read-only array
consisting of the opening
chars, text
, and closing
chars.
Example usage
// Example usage.
import { Wrapper } from '@angular-package/wrapper';
const longText = new Wrapper('{', '}', '{This is a long text}');
// Returns ['{', '{This is a long text}', '}'].
longText.toArray();
Last updated
Was this helpful?