Wrapper() constructor

Wrapper()

Creates a new Wrapper instance with the opening and closing.

constructor(opening: Opening, closing: Closing) {
  super(opening, closing);
}

Parameters

Name: typeDescription

opening: Opening

The wrap opening of a generic type variable Opening.

closing: Closing

The wrap closing of a generic type variable Closing.

Returns

The return value is a new instance of Wrapper.

Example usage

// Example usage.
import { Wrapper } from '@angular-package/text';

// Returns Wrapper {'{{}}'}
new Wrapper(`{{`, `}}`);

// This example shows the provided opening and closing is wrong,
// resulting in a returned empty string.
// Returns Wrapper {''}
new Wrapper(null as any, null as any);

Last updated