[Symbol.toStringTag]
[Symbol.toStringTag]
[Symbol.toStringTag]
The get
accessor, with the help of toStringTag
of Symbol, changes the default object tag to attribute
for an instance of the Attribute
.
public get [Symbol.toStringTag](): string {
return 'attribute';
}
Example usage
// Example usage.
import { Attribute } from '@angular-package/tag';
import { typeOf } from '@angular-package/type';
// Define the attribute.
const attributeColor = new Attribute('color', 'red');
// Returns 'attribute'.
typeOf(attributeColor);
Last updated
Was this helpful?