# 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);
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.angular-package.dev/text/wrapper/wrapped/instance-accessors.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
