Variable() constructor

Variable()

Creates a new instance of Variable with a specified name and optional value.

variable.class.ts
constructor(name: Name, value?: Value) {
  super(name, '{', '}');
  isDefined(value) && (this.#value = value);
}

Parameters

Name: type
Description

name: Name

The variable name in form {name} of a generic type variable Name to create.

value?: Value

An optional variable value of a generic type variable Value.

Example usage

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

Last updated