Instance accessors
Public
Wrapped.prototype.closing
Wrapped.prototype.closing
The get
accessor gets the closing of the wrap.
public get closing(): Closing {
return this.#closing;
}
Returns
The return value is the wrap closing of a generic type variable Closing
.
Wrapped.prototype.opening
Wrapped.prototype.opening
The get
accessor gets the opening of the wrap.
public get opening(): Opening {
return this.#opening;
}
Returns
The return value is the wrap opening of a generic type variable Opening
.
Wrapped.prototype.text
Wrapped.prototype.text
The get
accessor gets the text.
public get text(): Text {
return this.#text;
}
Returns
The return value is the text of a generic type variable Text
.
Wrapped.prototype.value
Wrapped.prototype.value
The get
accessor gets the wrapped text primitive value of a specified object.
public get value(): `${Opening}${Text}${Closing}` {
return this.valueOf();
}
Returns
The return value is the text of a generic type variable in order Opening
, Text
, Closing
on the template.
[Symbol.toStringTag]
[Symbol.toStringTag]
The property, with the help of toStringTag
of Symbol, changes the default object tag to wrapped
for an instance of the Wrapped
.
public get [Symbol.toStringTag](): string {
return 'wrapped';
}
Example usage
// Example usage.
import { Wrap, Wrapped } from '@angular-package/text';
import { typeOf } from '@angular-package/type';
// Define the Wrapped<"[Oh no, I am wrapped]", "[", "]">.
const wrapped = new Wrapped(`[Oh no, I am wrapped]`, new Wrap('[', ']'));
// Returns 'wrapped'.
typeOf(wrapped);
Last updated
Was this helpful?