> For the complete documentation index, see [llms.txt](https://wrapper.angular-package.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wrapper.angular-package.dev/wrapper/constructor.md).

# Constructor

## `Wrapper()`

Creates a new [`Wrapper`](/wrapper/overview.md) instance with the [`opening`](#opening-opening) and [`closing`](#closing-closing) chars and optional [`text`](#text-text).

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

```typescript
constructor(opening: Opening, closing: Closing, text: Text = '' as Text) {
  super(opening, closing, text);
}
```

{% endcode %}

### Parameters

#### `opening:`[<mark style="color:green;">`Opening`</mark>](/wrapper/generic-type-variables.md#wrap-opening)

The **opening** chars of a generic type variable [`Opening`](/wrapper/generic-type-variables.md#wrap-opening) placed before the given [`text`](#text-text).

#### `closing:`[<mark style="color:green;">`Closing`</mark>](/wrapper/generic-type-variables.md#closingextendsstring-string)

The **closing** chars of a generic type variable [`Closing`](/wrapper/generic-type-variables.md#wrap-closing) placed after the given [`text`](#text-text).

#### `text:`[<mark style="color:green;">`Text`</mark>](https://wrapper.angular-package.dev/wrapper/pages/8pklXCrH2XMJA5SN1dLm#wrapper-less-than...-text-...greater-than)

Optional **text** of a generic type variable [`Text`](https://wrapper.angular-package.dev/wrapper/pages/8pklXCrH2XMJA5SN1dLm#wrapper-less-than...-text-...greater-than) to wrap by given [`opening`](#opening-opening) and [`closing`](#closing-closing) chars.

### Returns

The **return value** is a new instance of [`Wrapper`](/wrapper/overview.md).

## Example usage

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

// Returns Wrapper {'{{}}'} of type Wrapper<"{{", "", "}}">
new Wrapper(`{{`, `}}`);

// Returns Wrapper {'{{variable}}'} of type Wrapper<"{{", "variable", "}}">
new Wrapper(`{{`, `}}`, 'variable');

// Returns Wrapper {'nullnull'} of typr Wrapper<any, "", any>
new Wrapper(null as any, null as any);
```
