valueOf()

Wrap.prototype.valueOf()

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

wrap.class.ts
public valueOf(): `${Opening}${Text}${Closing}` {
  return super.valueOf() 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').valueOf();

Last updated