# Instance accessors

## Public

### `Wrapped.prototype.closing`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor gets the [closing](https://docs.angular-package.dev/text/basic-concepts#closing) of the [wrap](https://docs.angular-package.dev/text/basic-concepts#wrap).

{% code title="wrapped.class.ts" %}

```typescript
public get closing(): Closing {
  return this.#closing;
}
```

{% endcode %}

#### Returns

The **return value** is the [wrap closing](https://docs.angular-package.dev/text/basic-concepts#closing) of a generic type variable [`Closing`](https://docs.angular-package.dev/text/wrapper/generic-type-variables#wrapped-less-than-closing-greater-than).

### `Wrapped.prototype.opening`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor gets the [opening](#opening) of the [wrap](https://docs.angular-package.dev/text/basic-concepts#wrap).

{% code title="wrapped.class.ts" %}

```typescript
public get opening(): Opening {
  return this.#opening;
}
```

{% endcode %}

#### Returns

The **return value** is the [wrap opening](#opening) of a generic type variable [`Opening`](https://docs.angular-package.dev/text/wrapper/generic-type-variables#wrapped-less-than-opening-greater-than).

### `Wrapped.prototype.text` <a href="#wrapped.property.text" id="wrapped.property.text"></a>

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor gets the text.

{% code title="wrapped.class.ts" %}

```typescript
public get text(): Text {
  return this.#text;
}
```

{% endcode %}

#### Returns

The **return value** is the text of a generic type variable [`Text`](https://docs.angular-package.dev/text/wrapper/generic-type-variables#wrapped-less-than-text-greater-than).

### `Wrapped.prototype.value`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor gets the wrapped text primitive value of a specified object.

{% code title="wrapped.class.ts" %}

```typescript
public get value(): `${Opening}${Text}${Closing}` {
  return this.valueOf();
}
```

{% endcode %}

#### Returns

The **return value** is the text of a generic type variable in order [`Opening`](https://docs.angular-package.dev/text/wrapper/generic-type-variables#wrapped-less-than-opening-greater-than), [`Text`](https://docs.angular-package.dev/text/wrapper/generic-type-variables#wrapped-less-than-text-greater-than), [`Closing`](https://docs.angular-package.dev/text/wrapper/generic-type-variables#wrapped-less-than-closing-greater-than) on the template.

### `[Symbol.toStringTag]`

The property, with the help of [`toStringTag`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag) of Symbol, changes the default object tag to `wrapped` for an instance of the [`Wrapped`](https://docs.angular-package.dev/text/wrapper/wrapped).

{% hint style="info" %}
**Good to know:** The property can be read by the `typeOf()` function of the type package.
{% endhint %}

{% code title="wrapped.class.ts" %}

```typescript
public get [Symbol.toStringTag](): string {
  return 'wrapped';
}
```

{% endcode %}

#### Example usage

```typescript
// 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);
```
