toString()

Wrap.prototype.toString()

Gets the wrap, the primitive value of a specified Wrap object.

wrap.class.ts
public toString(): `${Opening}${Text}${Closing}` {
  return super.toString() as `${Opening}${Text}${Closing}`;
}

Return type

${Opening}${Text}${Closing}

The return type is the template literal of generic type variables in order Opening, Text and Closing.

Returns

The return value is the wrap of generic type variables in order Opening, Text, and Closing on the template.

Example usage

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

// Returns [quote] of type "[quote]".
new Wrap(`[`, `]`, 'quote').toString();

Last updated