angular-package
TwitterGitHub
Text
Text
  • Introduction
  • Benefits
  • Getting started
    • General concepts
    • Skeleton
    • Installation
    • Public API
  • Wrapper
    • Basic concepts
    • Wrap
      • Generic type variables
      • Instance accessors
      • Instance properties
      • Static methods
      • Wrap() constructor
      • Instance methods
      • Examples
    • Wrapper
      • Generic type variables
      • Static properties
      • Instance accessors
      • Static methods
      • Wrapper() constructor
      • Instance methods
      • Examples
    • Wrapped
      • Generic type variables
      • Instance accessors
      • Instance properties
      • Static methods
      • Wrapped() constructor
      • Instance methods
      • Types
      • Examples
  • Tag
    • Basic concepts
    • Tag
      • Generic type variables
      • Static accessors
      • Static properties
      • Instance accessors
      • Instance properties
      • Static methods
      • Tag() constructor
      • Instance methods
      • Types
      • Examples
    • BBCodeTag
      • Static methods
      • BBCodeTag() constructor
    • HtmlTag
      • Generic type variables
      • HtmlTag() constructor
    • Tags
    • Tagged
  • Main
    • AllowedChars
    • Attribute
      • Generic type variables
      • Instance accessors
      • Instance properties
      • Static methods
      • Attribute() constructor
      • Instance methods
    • Attributes
    • Template
    • Text
  • Legend
    • Property tags
  • Other
    • Contact
    • Sponsor
  • More versions
Powered by GitBook
On this page

Was this helpful?

  1. Wrapper
  2. Wrapper

Wrapper() constructor

PreviousStatic methodsNextInstance methods

Last updated 3 years ago

Was this helpful?

Wrapper()

Creates a new instance with the opening and closing.

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

Parameters

Name: type
Description

opening: Opening

closing: Closing

Returns

The return value is a new instance of .

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);

The wrap opening of a generic type variable .

The wrap closing of a generic type variable .

Wrapper
Wrapper
Opening
Closing