# \[Symbol.toStringTag]

## `[Symbol.toStringTag]`

The [`get`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/get) accessor [`toStringTag`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol/toStringTag) of the [`Symbol`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol) changes the default tag `String` of the instance to the custom tag `Wrap`. It can be read by the [`typeOf()`](https://type.angular-package.dev/v/type-draft/helper/typeof) function of [`@angular-package/type`](https://type.angular-package.dev/).

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

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

{% endcode %}

## Example usage

```typescript
// Example usage.
import { Wrap } from '@angular-package/wrapper';
import { typeOf } from '@angular-package/type';

// Define the wrap.
const tagWrap = new Wrap('[', ']');

// Returns [object Wrap].
Object.prototype.toString.call(tagWrap);

// Returns wrap.
typeOf(tagWrap);
```


---

# 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://wrapper.angular-package.dev/wrap/accessors/symbol.tostringtag.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.
